ltsecurityinc安防产品在线商城代码
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Olegnax
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Olegnax.com license that is
|
||||
* available through the world-wide-web at this URL:
|
||||
* https://www.olegnax.com/license
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this extension to newer
|
||||
* version in the future.
|
||||
*
|
||||
* @category Olegnax
|
||||
* @package Olegnax_Athlete2
|
||||
* @copyright Copyright (c) 2010-2021 Olegnax (http://www.olegnax.com/)
|
||||
* @license https://www.olegnax.com/license
|
||||
*/
|
||||
|
||||
@import "variables/_icons.less";
|
||||
|
||||
.lib-font-face(
|
||||
@family-name: @icons-athlete2__font-name,
|
||||
@font-path: @icons-athlete2__font-name-path,
|
||||
@font-weight: normal,
|
||||
@font-style: normal
|
||||
);
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Olegnax
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Olegnax.com license that is
|
||||
* available through the world-wide-web at this URL:
|
||||
* https://www.olegnax.com/license
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this extension to newer
|
||||
* version in the future.
|
||||
*
|
||||
* @category Olegnax
|
||||
* @package Olegnax_Athlete2
|
||||
* @copyright Copyright (c) 2010-2021 Olegnax (http://www.olegnax.com/)
|
||||
* @license https://www.olegnax.com/license
|
||||
*/
|
||||
|
||||
@icons-athlete2__font-name: 'Athlete2 Icons';
|
||||
@icons-athlete2__file-name: 'athlete2-icons';
|
||||
@icons-athlete2__font-name-path: '@{baseDir}Olegnax_Athlete2/fonts/@{icons-athlete2__file-name}/@{icons-athlete2__file-name}';
|
||||
@icon-athlete2__content: '\e900';
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>
|
||||
<json>
|
||||
<![CDATA[
|
||||
{
|
||||
"fontFamily": "Athlete2-Icons",
|
||||
"majorVersion": 1,
|
||||
"minorVersion": 0,
|
||||
"version": "Version 1.0",
|
||||
"fontId": "Athlete2-Icons",
|
||||
"psName": "Athlete2-Icons",
|
||||
"subFamily": "Regular",
|
||||
"fullName": "Athlete2-Icons",
|
||||
"description": "Font generated by IcoMoon."
|
||||
}
|
||||
]]>
|
||||
</json>
|
||||
</metadata>
|
||||
<defs>
|
||||
<font id="Athlete2-Icons" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="athlete-2-logo" data-tags="athlete-2-logo-ai" horiz-adv-x="978" d="M312.889 960l-312.889-1024h216.178l56.889 227.556h278.756l51.2-227.556h216.178l-318.578 1024h-187.733zM312.889 334.222l96.711 341.333 96.711-341.333h-193.422zM694.044 960h113.778v-337.92h-113.778v337.92zM864.711 960h113.778v-337.92h-113.778v337.92z" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,114 @@
|
||||
.athleteform-onoff-container {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
height: 36px;
|
||||
width: 132px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-box-shadow: inset 1px 1px 6px 0px rgba(170, 157, 137, .16);
|
||||
box-shadow: inset 1px 1px 6px 0px rgba(170, 157, 137, .16);
|
||||
-webkit-transition: all .3s ease-in-out;
|
||||
-moz-transition: all .3s ease-in-out;
|
||||
-o-transition: all .3s ease-in-out;
|
||||
transition: all .3s ease-in-out;
|
||||
border: 1px solid #d2d2d2;
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.athleteform-onoff-container.disabled.checked {
|
||||
border-color: rgba(0, 0, 0, 0.4);
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.athleteform-onoff-container.disabled .athleteform-onoff-button {
|
||||
color: rgba(0, 0, 0, 0.4) !important;
|
||||
}
|
||||
|
||||
.athleteform-onoff-container.checked {
|
||||
background: #96b100;
|
||||
border-color: #96b100;
|
||||
}
|
||||
|
||||
.athleteform-onoff-container.checked .athleteform-onoff-button {
|
||||
left: 4px;
|
||||
color: #96b100;
|
||||
}
|
||||
|
||||
.athleteform-onoff-container .athleteform-onoff-button {
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
font: normal normal normal 14px/1 TIFontAwesome;
|
||||
font-size: inherit;
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
left: 66px;
|
||||
width: 59px;
|
||||
height: 27px;
|
||||
line-height: 18px;
|
||||
padding: 4px;
|
||||
text-align: center;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 2px;
|
||||
-webkit-box-shadow: 1px 1px 4px 0px rgba(2, 2, 2, .21);
|
||||
box-shadow: 1px 1px 4px 0px rgba(2, 2, 2, .21);
|
||||
-webkit-transition: all 350ms cubic-bezier(0, 0.89, 0.44, 1);
|
||||
-moz-transition: all 350ms cubic-bezier(0, 0.89, 0.44, 1);
|
||||
-o-transition: all 350ms cubic-bezier(0, 0.89, 0.44, 1);
|
||||
transition: all 350ms cubic-bezier(0, 0.89, 0.44, 1);
|
||||
color: #6b625a;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* Default Unchecked Icon */
|
||||
.athleteform-onoff-container .athleteform-onoff-button:after,
|
||||
.athleteform-onoff-container .athleteform-onoff-button:before {
|
||||
content: "";
|
||||
width: 10px;
|
||||
height: 2px;
|
||||
background: #524a43;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 25px;
|
||||
top: 12px;
|
||||
}
|
||||
.athleteform-onoff-container .athleteform-onoff-button:before {
|
||||
transform: rotateZ(45deg);
|
||||
}
|
||||
.athleteform-onoff-container .athleteform-onoff-button:after {
|
||||
transform: rotateZ(-45deg);
|
||||
}
|
||||
|
||||
/* Checked Icon */
|
||||
.athleteform-onoff-container.checked .athleteform-onoff-button:before,
|
||||
.athleteform-onoff-container.checked .athleteform-onoff-button:after {
|
||||
background: #96b100;
|
||||
}
|
||||
.athleteform-onoff-container.checked .athleteform-onoff-button:before {
|
||||
width: 10px;
|
||||
left: 26px;
|
||||
top: 12px;
|
||||
transform: rotateZ(-45deg);
|
||||
}
|
||||
.athleteform-onoff-container.checked .athleteform-onoff-button:after {
|
||||
width: 5px;
|
||||
left: 24px;
|
||||
top: 14px;
|
||||
transform: rotateZ(45deg);
|
||||
}
|
||||
|
||||
/* Disabled */
|
||||
.athleteform-onoff-container.disabled {
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
.athleteform-onoff-container select {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
require( [ "jquery" ], function ( $ ) {
|
||||
"use strict";
|
||||
|
||||
$( function () {
|
||||
$.fn.athlete_onoff = function ( so ) {
|
||||
var sd = {
|
||||
value: {
|
||||
on: '',
|
||||
off: ''
|
||||
},
|
||||
class: 'athleteform-onoff',
|
||||
wrap: 'container',
|
||||
button: 'button'
|
||||
},
|
||||
s = $.extend( true, { }, sd, so );
|
||||
return $( this ).each( function () {
|
||||
var a = $( this ),
|
||||
d1c = s.class + '-' + s.wrap;
|
||||
if ( !a.is( 'select' ) || ( !a.children( 'option[value=0]' ).length || !a.children( 'option[value=1]' ).length ) || a.parent( '.' + d1c ).length ) {
|
||||
return a;
|
||||
}
|
||||
var b1 = $( '<div>' ).attr( {
|
||||
class: s.class + '-' + s.button
|
||||
} ),
|
||||
d1 = $( '<div>' ).attr( {
|
||||
id: a.attr( 'id' ) + '_' + s.wrap,
|
||||
class: d1c
|
||||
} );
|
||||
d1.attr( 'class', ( d1.attr( 'class' ) ) );
|
||||
if ( a.is( ':disabled' ) ) {
|
||||
d1.toggleClass( 'disabled', a.is( ':disabled' ) );
|
||||
}
|
||||
d1.toggleClass( 'checked', '0' != a.val() )
|
||||
a.hide().wrap( d1 ).before( b1 );
|
||||
d1 = a.parent();
|
||||
a.off( 'change.onofftrigger' ).on( 'change.onofftrigger', function ( e ) {
|
||||
d1.toggleClass( 'disabled', a.is( ':disabled' ) );
|
||||
if ( d1.hasClass( 'disabled' ) ) {
|
||||
return e.preventDefault();
|
||||
}
|
||||
d1.toggleClass( 'checked', '0' != a.val() );
|
||||
} );
|
||||
d1.off( 'click.onofftrigger' ).on( 'click.onofftrigger', function ( e ) {
|
||||
if ( d1.hasClass( 'disabled' ) ) {
|
||||
return e.preventDefault();
|
||||
}
|
||||
if ( a.is( ':enabled' ) ) {
|
||||
var value = ( '0' != a.val() ) ? '0' : '1';
|
||||
a.val( value );
|
||||
a[0].dispatchEvent( new Event( 'change' ) );
|
||||
a.trigger( 'change' );
|
||||
}
|
||||
} );
|
||||
return a;
|
||||
} );
|
||||
};
|
||||
|
||||
$( '.on-off-trigger' ).athlete_onoff();
|
||||
} );
|
||||
} );
|
||||
@@ -0,0 +1,31 @@
|
||||
.select-image-wrap, .select-image-wrap ul {
|
||||
list-style: none;
|
||||
}
|
||||
.select-image-wrap li{
|
||||
display: inline-block;
|
||||
}
|
||||
.select-image-wrap li {
|
||||
margin: 5px;
|
||||
font-size: 0;
|
||||
cursor: pointer;
|
||||
transition: 0.3s ease;
|
||||
transition-property: box-shadow, border, transform;
|
||||
border: 4px solid transparent;
|
||||
}
|
||||
.select-image-wrap li:hover,
|
||||
.select-image-wrap li.select-image-selected {
|
||||
border-color: #96b100;
|
||||
}
|
||||
|
||||
.select-image-wrap li {
|
||||
box-shadow: 0 4px 39px 0px rgba(0, 0, 0, .06);
|
||||
transform: none;
|
||||
}
|
||||
.select-image-wrap li:hover,
|
||||
.select-image-wrap li.select-image-selected {
|
||||
box-shadow: 0 2px 7px 0px rgba(0, 0, 0, .06);
|
||||
transform: translateY(3px);
|
||||
}
|
||||
select.select-image {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
require( [ "jquery" ], function ( $ ) {
|
||||
"use strict";
|
||||
$.fn.selectimage = function ( so ) {
|
||||
var action = '',
|
||||
s,
|
||||
sd = {
|
||||
class: {
|
||||
wraper: 'select-image-wrap',
|
||||
list: 'select-image-items',
|
||||
item: 'select-image-item',
|
||||
image: 'select-image-image',
|
||||
element: 'select-image-element',
|
||||
active: 'select-image-selected',
|
||||
}
|
||||
}
|
||||
if ( 'string' === typeof so ) {
|
||||
action = so;
|
||||
} else {
|
||||
s = $.extend( true, { }, sd, so );
|
||||
}
|
||||
return $( this ).each( function ( ) {
|
||||
var $this = $( this ),
|
||||
$parent = $this.parent( );
|
||||
if ( !$this.is( 'select' ) && $this.children( ).length ) {
|
||||
return;
|
||||
}
|
||||
var $wraper = $parent.find( '.' + s.class.wraper ),
|
||||
generate_images = function ( $parentlist ) {
|
||||
$this.children( ).each( function ( ) {
|
||||
var $item = $( this );
|
||||
if ( $item.is( 'optgroup' ) ) {
|
||||
var item_value = $item.attr( 'label' ),
|
||||
$li = $parentlist.find( '.' + s.class.item + '.' + s.class.item + '-optgroup[data-value="' + item_value + '"]' ),
|
||||
$submenu;
|
||||
if ( !$li.length ) {
|
||||
$li = $( '<li>' ).addClass( s.class.item ).addClass( s.class.item + '-optgroup' ).attr( 'data-value', item_value ).html( $img );
|
||||
$parentlist.append( $li );
|
||||
}
|
||||
if ( !$li.children( 'span' ) ) {
|
||||
$li.prepend( $( '<span>' ).text( $item ) )
|
||||
}
|
||||
$submenu = $li.children( 'ul.' + s.class.list );
|
||||
if ( !$submenu.length ) {
|
||||
$submenu = $( '<ul>' ).addClass( s.class.list );
|
||||
$li.append( $submenu );
|
||||
}
|
||||
generate_images.call( $item, $submenu );
|
||||
} else if ( $item.is( 'option' ) ) {
|
||||
var item_value = $item.attr( 'value' );
|
||||
if ( !$parentlist.find( '.' + s.class.item + '.' + s.class.item + '-option[data-value="' + item_value + '"]' ).length ) {
|
||||
var item_url = $item.text(),
|
||||
$img = $( '<img>' ).attr( {
|
||||
src: item_url,
|
||||
alt: item_value,
|
||||
class: s.class.image,
|
||||
} );
|
||||
var $li = $( '<li>' ).addClass( s.class.item ).addClass( s.class.item + '-option' ).attr( 'data-value', item_value ).html( $img );
|
||||
$parentlist.append( $li );
|
||||
}
|
||||
}
|
||||
} );
|
||||
};
|
||||
if ( 'select' === action ) {
|
||||
|
||||
return;
|
||||
}
|
||||
if ( !$wraper.length ) {
|
||||
$wraper = $( '<ul>' ).addClass( s.class.wraper ).addClass( s.class.list );
|
||||
$parent.prepend( $wraper );
|
||||
}
|
||||
generate_images.call( $this, $wraper );
|
||||
$wraper.on( 'click', '.' + s.class.item + '-option', function ( e ) {
|
||||
e.preventDefault();
|
||||
var value = $( this ).data( 'value' );
|
||||
if ( $this.find( 'option[value="' + value + '"]' ).length ) {
|
||||
$this.val( value ).trigger( 'change' );
|
||||
}
|
||||
} );
|
||||
$this.on( 'change', function () {
|
||||
var value = $( this ).val(),
|
||||
$item_image = $wraper.find( '.' + s.class.item + '-option[data-value="' + value + '"]' ),
|
||||
$items_active = $wraper.find( '.' + s.class.item + '.' + s.class.active ).not( $item_image );
|
||||
$items_active.removeClass( s.class.active );
|
||||
$item_image.addClass( s.class.active );
|
||||
} );
|
||||
|
||||
$this.trigger( 'change' ).addClass( s.class.element ).hide( );
|
||||
} );
|
||||
};
|
||||
$(function(){
|
||||
$( '.select-image' ).selectimage();
|
||||
});
|
||||
} );
|
||||