feat: Add comprehensive documentation suite and reorganize project structure

- Created complete documentation in docs/ directory
- Added PROJECT_OVERVIEW.md with feature highlights and getting started guide
- Added ARCHITECTURE.md with system design and technical details
- Added SECURITY.md with comprehensive security implementation guide
- Added DEVELOPMENT.md with development workflows and best practices
- Added DEPLOYMENT.md with production deployment instructions
- Added API.md with complete REST API documentation
- Added CONTRIBUTING.md with contribution guidelines
- Added CHANGELOG.md with version history and migration notes
- Reorganized all documentation files into docs/ directory for better organization
- Updated README.md with proper documentation links and quick navigation
- Enhanced project structure with professional documentation standards
This commit is contained in:
SamiAhmed7777
2025-10-21 00:39:45 -07:00
commit 0b7e2d0a5b
6080 changed files with 1332936 additions and 0 deletions

View File

@@ -0,0 +1,85 @@
.cbp-spmenu-push {
width: 100%;
min-height: 740px;
}
.push-part {
width: calc(100% - 60px);
}
.push-full {
width: calc(100% - 300px);
}
.blue .accordion {
border-top: 1px solid #013d6c;
border-right: 1px solid #013d6c;
border-left: 1px solid #013d6c;
font-size: 16px;
border-bottom: 1px solid #282b30 !important;
}
.blue .accordion, .blue .accordion li {
margin: 0;
padding: 0;
border: none;
}
.blue .accordion a {
padding: 0px;
background: #181a1d;
text-decoration:none;
display: block;
color: #9398a2;
border-bottom: 1px solid #0c0d0f;
border-top: 1px solid #282b30;
height: 60px;
overflow: hidden;
}
.blue .accordion ul li a {
padding-left: 60px;
height: 30px;
line-height: 30px;
font-size: 14px;
border: none;
}
/*.blue .accordion ul li a::before {
font-family: 'icomoonBe';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: "\f03e";
margin-right: 3px;
font-size: 16px;
}*/
.blue .accordion ul li a.sub_menu::before {
font-family: 'icomoonBe';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: "\e605";
margin-right: 5px;
margin-left: -1px;
font-size: 10px;
}
.blue .accordion a.dcjq-parent.active {
/* background: #25272b url(images/checkers.png) repeat 0 0;*/
color: white;
}
.blue .accordion a:hover {
background: #25272b;
color: white;
}
.blue .accordion a:active{
}

View File

@@ -0,0 +1 @@
.cbp-spmenu-push{width:100%;min-height:740px}.push-part{width:calc(100% - 60px)}.push-full{width:calc(100% - 300px)}.blue .accordion{border-top:1px solid #013d6c;border-right:1px solid #013d6c;border-left:1px solid #013d6c;font-size:16px;border-bottom:1px solid #282b30 !important}.blue .accordion,.blue .accordion li{margin:0;padding:0;border:0}.blue .accordion a{padding:0;background:#181a1d;text-decoration:none;display:block;color:#9398a2;border-bottom:1px solid #0c0d0f;border-top:1px solid #282b30;height:60px;overflow:hidden}.blue .accordion ul li a{padding-left:60px;height:30px;line-height:30px;font-size:14px;border:0}.blue .accordion ul li a.sub_menu::before{font-family:'icomoonBe';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e605";margin-right:5px;margin-left:-1px;font-size:10px}.blue .accordion a.dcjq-parent.active{color:white}.blue .accordion a:hover{background:#25272b;color:white}

View File

@@ -0,0 +1,2 @@
.cbp-spmenu-push{width:100%;min-height:740px}.push-part{width:calc(100% - 60px)}.push-full{width:calc(100% - 300px)}.blue .accordion{border-top:1px solid #013d6c;border-right:1px solid #013d6c;border-left:1px solid #013d6c;font-size:16px;border-bottom:1px solid #282b30 !important}.blue .accordion,.blue .accordion li{margin:0;padding:0;border:0}.blue .accordion a{padding:0;background:#1f1f1f;text-decoration:none;display:block;color:#9398a2;border-bottom:1px solid #0c0d0f;border-top:1px solid #282b30;height:60px;overflow:hidden}.blue .accordion ul li a{padding-left:60px;height:30px;line-height:30px;font-size:14px;border:0}.blue .accordion ul li a.sub_menu::before{font-family:'icomoonBe';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\e605";margin-right:5px;margin-left:-1px;font-size:10px}.blue .accordion a.dcjq-parent.active{color:white}.blue .accordion a:hover{background:#25272b;color:white}
.icheckbox_square-blue,.iradio_square-blue{display:inline-block;*display:inline;vertical-align:middle;margin:3px 5px 3px 0;padding:0;width:16px;height:16px;background:url(../blue/images/blue.png) no-repeat;border:0;cursor:pointer}.settings_content{margin-top:10px}.icheckbox_square-blue{background-position:0 0}.icheckbox_square-blue.hover{background-position:-18px 0}.icheckbox_square-blue.checked{background-position:-36px 0}.icheckbox_square-blue.disabled{background-position:-54px 0;cursor:default}.icheckbox_square-blue.checked.disabled{background-position:-72px 0}.iradio_square-blue{background-position:-90px 0;width:17px}.iradio_square-blue.hover{background-position:-108px 0}.iradio_square-blue.checked{background-position:-126px 0}.iradio_square-blue.disabled{background-position:-145px 0;cursor:default}.iradio_square-blue.checked.disabled{background-position:-163px 0}.icheckbox_line-blue,.iradio_line-blue{position:relative;display:block;margin:0;padding:5px 15px 5px 38px;font-size:13px;line-height:17px;color:#fff;background:#06a2cb;border:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;cursor:pointer}.icheckbox_line-blue .icheck_line-icon,.iradio_line-blue .icheck_line-icon{position:absolute;top:50%;left:13px;width:13px;height:11px;margin:-5px 0 0 0;padding:0;overflow:hidden;background:url(../blue/images/line.png) no-repeat;border:0}.icheckbox_line-blue.hover,.icheckbox_line-blue.checked.hover,.iradio_line-blue.hover{background:#17b3dc}.icheckbox_line-blue.checked,.iradio_line-blue.checked{background:#3e83b7}.icheckbox_line-blue.checked .icheck_line-icon,.iradio_line-blue.checked .icheck_line-icon{background-position:-15px 0}.icheckbox_line-blue.disabled,.iradio_line-blue.disabled{background:#add7f0;cursor:default}.icheckbox_line-blue.disabled .icheck_line-icon,.iradio_line-blue.disabled .icheck_line-icon{background-position:-30px 0}.icheckbox_line-blue.checked.disabled,.iradio_line-blue.checked.disabled{background:#add7f0}.icheckbox_line-blue.checked.disabled .icheck_line-icon,.iradio_line-blue.checked.disabled .icheck_line-icon{background-position:-45px 0}.icheck-box.ask .iradio_line-blue{margin-right:10px}.selector{margin:0;position:relative}*[id^='categ-entry-form'] .selector{margin-bottom:10px}.selector i{color:#737373;height:30px;line-height:30px;position:absolute;right:0;text-align:center;top:0;width:30px;z-index:112}.selector::after{clear:both;content:".";display:block;height:0;overflow:hidden;visibility:hidden}.selector select{position:absolute;left:-1000em}.selector label,.selector .select-box,.selector button{float:left;margin-right:29px}.selector label{padding-top:.2em}.selector .select-box{position:relative;width:100%}.selector .select-box .trigger{background:none repeat scroll 0 0 #fff;border:medium none;color:#000;cursor:pointer;font-size:14px;font-weight:normal;height:40px;line-height:30px;margin:0;padding:5px 9px}#trigger-ipp_select{line-height:20px;height:initial}.selector .select-box .choices{background:none repeat scroll 0 0 #fff;border-bottom-left-radius:3px;border-bottom-right-radius:3px;color:#505050;display:none;left:0;list-style:outside none none;margin:0;padding:0;position:absolute;top:28px;width:100%;max-height:295px;overflow-y:scroll}.selector .select-box .choices li{cursor:pointer;display:block;margin-bottom:.3em;padding:5px 5px 5px 15px;font-size:13px;font-weight:normal;color:#505050}.selector .select-box .choices li:hover{background:none repeat scroll 0 0 #f1f1f1}.choices{position:absolute;z-index:200}.selector .icon-times{color:#505050;content:"\f0a3";font-size:10px}.selector .iconBe-chevron-down{font-size:10px;border-left:1px solid #f1f1f1}.entry-form-class .select-box .trigger::before,#ct-set-form .select-box .trigger::before{font-family:"icomoonBe";content:"\f0a3";position:absolute;right:8px;padding-left:7px;border-left:1px solid #e0e0e0}#paging-top .select-box .trigger::before{font-family:"icomoonBe";content:"\f0a3";position:absolute;right:8px;padding-left:7px;border-left:1px solid #e0e0e0}.entry-form-class .selector .select-box .trigger,#ct-set-form .selector .select-box .trigger{background:none repeat scroll 0 0 #f5f5f5;box-shadow:0 2px 3px rgba(0,0,0,0.1) inset}.entry-form-class .selector .select-box .choices,#ct-set-form .selector .select-box .choices{background:none repeat scroll 0 0 #f5f5f5;box-shadow:0 2px -1px rgba(0,0,0,0.1) inset}.selector.fe .select-box .choices{position:relative;top:auto}

View File

@@ -0,0 +1,249 @@
/* iCheck plugin Square skin, blue
----------------------------------- */
.icheckbox_square-blue,
.iradio_square-blue {
display: inline-block;
*display: inline;
vertical-align: middle;
margin: 3px 5px 3px 0px;
padding: 0;
width: 16px;
height: 16px;
background: url(../blue/images/blue.png) no-repeat;
border: none;
cursor: pointer;
}
.settings_content {
margin-top: 10px;
}
.icheckbox_square-blue {
background-position: 0 0;
}
.icheckbox_square-blue.hover {
background-position: -18px 0;
}
.icheckbox_square-blue.checked {
background-position: -36px 0;
}
.icheckbox_square-blue.disabled {
background-position: -54px 0;
cursor: default;
}
.icheckbox_square-blue.checked.disabled {
background-position: -72px 0;
}
.iradio_square-blue {
background-position: -90px 0;
width: 17px;
}
.iradio_square-blue.hover {
background-position: -108px 0;
}
.iradio_square-blue.checked {
background-position: -126px 0;
}
.iradio_square-blue.disabled {
background-position: -145px 0;
cursor: default;
}
.iradio_square-blue.checked.disabled {
background-position: -163px 0;
}
/* iCheck plugin Line skin, blue
----------------------------------- */
.icheckbox_line-blue,
.iradio_line-blue {
position: relative;
display: block;
margin: 0;
padding: 5px 15px 5px 38px;
font-size: 13px;
line-height: 17px;
color: #fff;
background: #06a2cb;
border: none;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
cursor: pointer;
}
.icheckbox_line-blue .icheck_line-icon,
.iradio_line-blue .icheck_line-icon {
position: absolute;
top: 50%;
left: 13px;
width: 13px;
height: 11px;
margin: -5px 0 0 0;
padding: 0;
overflow: hidden;
background: url(../blue/images/line.png) no-repeat;
border: none;
}
.icheckbox_line-blue.hover,
.icheckbox_line-blue.checked.hover,
.iradio_line-blue.hover {
background: #17b3dc;
}
.icheckbox_line-blue.checked,
.iradio_line-blue.checked {
background: #3e83b7;
}
.icheckbox_line-blue.checked .icheck_line-icon,
.iradio_line-blue.checked .icheck_line-icon {
background-position: -15px 0;
}
.icheckbox_line-blue.disabled,
.iradio_line-blue.disabled {
background: #ADD7F0;
cursor: default;
}
.icheckbox_line-blue.disabled .icheck_line-icon,
.iradio_line-blue.disabled .icheck_line-icon {
background-position: -30px 0;
}
.icheckbox_line-blue.checked.disabled,
.iradio_line-blue.checked.disabled {
background: #ADD7F0;
}
.icheckbox_line-blue.checked.disabled .icheck_line-icon,
.iradio_line-blue.checked.disabled .icheck_line-icon {
background-position: -45px 0;
}
.icheck-box.ask .iradio_line-blue {
margin-right: 10px;
}
.selector {
margin: 0px 0px 0px 0px;
position: relative;
/* z-index: 111;*/
}
*[id^='categ-entry-form'] .selector {
margin-bottom: 10px;
}
.selector i {
color: #737373;
height: 30px;
line-height: 30px;
position: absolute;
right: 0;
text-align: center;
top: 0;
width: 30px;
z-index: 112;
}
.selector::after {
clear: both;
content: ".";
display: block;
height: 0;
overflow: hidden;
visibility: hidden;
}
.selector select {
position: absolute;
left: -1000em;
}
.selector label, .selector .select-box, .selector button {
float: left;
margin-right: 29px;
}
.selector label {
/* font-weight: bold;*/
padding-top: 0.2em;
}
.selector .select-box {
position: relative;
width: 100%;
}
.selector .select-box .trigger {
background: none repeat scroll 0 0 #ffffff;
border: medium none;
/*border-radius: 3px;*/
color: #000000;
cursor: pointer;
font-size: 14px;
font-weight: normal;
height: 45px;
line-height: 35px;
margin: 0;
padding: 5px 9px;
}
#trigger-ipp_select {line-height: 20px; height: initial;}
.selector .select-box .choices {
background: none repeat scroll 0 0 #ffffff;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
color: #505050;
display: none;
left: 0;
list-style: outside none none;
margin: 0;
padding: 0;
position: absolute;
top: 28px;
width: 100%;
/**/
max-height: 295px;
overflow-y: scroll;
}
.selector .select-box .choices li {
cursor: pointer;
display: block;
margin-bottom: 0.3em;
padding: 5px 5px 5px 15px;
font-size: 13px;
font-weight: normal;
color: #505050;
}
.selector .select-box .choices li:hover {
background: none repeat scroll 0 0 #f1f1f1;
}
.choices {
position: absolute;
z-index: 200;
}
.selector .icon-times {
color: #505050;
content: "\f0a3";
font-size: 10px;
}
.selector .iconBe-chevron-down {
font-size: 10px;
border-left: 1px solid #f1f1f1;
}
.entry-form-class .select-box .trigger::before, #ct-set-form .select-box .trigger::before {
font-family: "icomoonBe";
content: "\f0a3";
position: absolute;
right: 8px;
padding-left: 7px;
border-left: 1px solid #e0e0e0;
}
#paging-top .select-box .trigger::before {
font-family: "icomoonBe";
content: "\f0a3";
position: absolute;
right: 8px;
padding-left: 7px;
border-left: 1px solid #e0e0e0;
}
.entry-form-class .selector .select-box .trigger, #ct-set-form .selector .select-box .trigger {
background: none repeat scroll 0 0 #f5f5f5;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1) inset;
}
.entry-form-class .selector .select-box .choices, #ct-set-form .selector .select-box .choices {
background: none repeat scroll 0 0 #f5f5f5;
box-shadow: 0 2px -1px rgba(0, 0, 0, 0.1) inset;
}
.selector.fe .select-box .choices {
position: relative;
top: auto;
}

View File

@@ -0,0 +1 @@
.icheckbox_square-blue,.iradio_square-blue{display:inline-block;*display:inline;vertical-align:middle;margin:3px 5px 3px 0;padding:0;width:16px;height:16px;background:url(../blue/images/blue.png) no-repeat;border:0;cursor:pointer}.settings_content{margin-top:10px}.icheckbox_square-blue{background-position:0 0}.icheckbox_square-blue.hover{background-position:-18px 0}.icheckbox_square-blue.checked{background-position:-36px 0}.icheckbox_square-blue.disabled{background-position:-54px 0;cursor:default}.icheckbox_square-blue.checked.disabled{background-position:-72px 0}.iradio_square-blue{background-position:-90px 0;width:17px}.iradio_square-blue.hover{background-position:-108px 0}.iradio_square-blue.checked{background-position:-126px 0}.iradio_square-blue.disabled{background-position:-145px 0;cursor:default}.iradio_square-blue.checked.disabled{background-position:-163px 0}.icheckbox_line-blue,.iradio_line-blue{position:relative;display:block;margin:0;padding:5px 15px 5px 38px;font-size:13px;line-height:17px;color:#fff;background:#06a2cb;border:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;cursor:pointer}.icheckbox_line-blue .icheck_line-icon,.iradio_line-blue .icheck_line-icon{position:absolute;top:50%;left:13px;width:13px;height:11px;margin:-5px 0 0 0;padding:0;overflow:hidden;background:url(../blue/images/line.png) no-repeat;border:0}.icheckbox_line-blue.hover,.icheckbox_line-blue.checked.hover,.iradio_line-blue.hover{background:#17b3dc}.icheckbox_line-blue.checked,.iradio_line-blue.checked{background:#3e83b7}.icheckbox_line-blue.checked .icheck_line-icon,.iradio_line-blue.checked .icheck_line-icon{background-position:-15px 0}.icheckbox_line-blue.disabled,.iradio_line-blue.disabled{background:#add7f0;cursor:default}.icheckbox_line-blue.disabled .icheck_line-icon,.iradio_line-blue.disabled .icheck_line-icon{background-position:-30px 0}.icheckbox_line-blue.checked.disabled,.iradio_line-blue.checked.disabled{background:#add7f0}.icheckbox_line-blue.checked.disabled .icheck_line-icon,.iradio_line-blue.checked.disabled .icheck_line-icon{background-position:-45px 0}.icheck-box.ask .iradio_line-blue{margin-right:10px}.selector{margin:0;position:relative}*[id^='categ-entry-form'] .selector{margin-bottom:10px}.selector i{color:#737373;height:30px;line-height:30px;position:absolute;right:0;text-align:center;top:0;width:30px;z-index:112}.selector::after{clear:both;content:".";display:block;height:0;overflow:hidden;visibility:hidden}.selector select{position:absolute;left:-1000em}.selector label,.selector .select-box,.selector button{float:left;margin-right:29px}.selector label{padding-top:.2em}.selector .select-box{position:relative;width:100%}.selector .select-box .trigger{background:none repeat scroll 0 0 #fff;border:medium none;color:#000;cursor:pointer;font-size:14px;font-weight:normal;height:45px;line-height:35px;margin:0;padding:5px 9px}#trigger-ipp_select{line-height:20px;height:initial}.selector .select-box .choices{background:none repeat scroll 0 0 #fff;border-bottom-left-radius:3px;border-bottom-right-radius:3px;color:#505050;display:none;left:0;list-style:outside none none;margin:0;padding:0;position:absolute;top:28px;width:100%;max-height:295px;overflow-y:scroll}.selector .select-box .choices li{cursor:pointer;display:block;margin-bottom:.3em;padding:5px 5px 5px 15px;font-size:13px;font-weight:normal;color:#505050}.selector .select-box .choices li:hover{background:none repeat scroll 0 0 #f1f1f1}.choices{position:absolute;z-index:200}.selector .icon-times{color:#505050;content:"\f0a3";font-size:10px}.selector .iconBe-chevron-down{font-size:10px;border-left:1px solid #f1f1f1}.entry-form-class .select-box .trigger::before,#ct-set-form .select-box .trigger::before{font-family:"icomoonBe";content:"\f0a3";position:absolute;right:8px;padding-left:7px;border-left:1px solid #e0e0e0}#paging-top .select-box .trigger::before{font-family:"icomoonBe";content:"\f0a3";position:absolute;right:8px;padding-left:7px;border-left:1px solid #e0e0e0}.entry-form-class .selector .select-box .trigger,#ct-set-form .selector .select-box .trigger{background:none repeat scroll 0 0 #f5f5f5;box-shadow:0 2px 3px rgba(0,0,0,0.1) inset}.entry-form-class .selector .select-box .choices,#ct-set-form .selector .select-box .choices{background:none repeat scroll 0 0 #f5f5f5;box-shadow:0 2px -1px rgba(0,0,0,0.1) inset}.selector.fe .select-box .choices{position:relative;top:auto}

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

View File

@@ -0,0 +1,509 @@
/*!
* iCheck v1.0.2, http://git.io/arlzeA
* ===================================
* Powerful jQuery and Zepto plugin for checkboxes and radio buttons customization
*
* (c) 2013 Damir Sultanov, http://fronteed.com
* MIT Licensed
*/
(function($) {
// Cached vars
var _iCheck = 'iCheck',
_iCheckHelper = _iCheck + '-helper',
_checkbox = 'checkbox',
_radio = 'radio',
_checked = 'checked',
_unchecked = 'un' + _checked,
_disabled = 'disabled',
_determinate = 'determinate',
_indeterminate = 'in' + _determinate,
_update = 'update',
_type = 'type',
_click = 'click',
_touch = 'touchbegin.i touchend.i',
_add = 'addClass',
_remove = 'removeClass',
_callback = 'trigger',
_label = 'label',
_cursor = 'cursor',
_mobile = /ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);
// Plugin init
$.fn[_iCheck] = function(options, fire) {
// Walker
var handle = 'input[type="' + _checkbox + '"], input[type="' + _radio + '"]',
stack = $(),
walker = function(object) {
object.each(function() {
var self = $(this);
if (self.is(handle)) {
stack = stack.add(self);
} else {
stack = stack.add(self.find(handle));
}
});
};
// Check if we should operate with some method
if (/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(options)) {
// Normalize method's name
options = options.toLowerCase();
// Find checkboxes and radio buttons
walker(this);
return stack.each(function() {
var self = $(this);
if (options == 'destroy') {
tidy(self, 'ifDestroyed');
} else {
operate(self, true, options);
}
// Fire method's callback
if ($.isFunction(fire)) {
fire();
}
});
// Customization
} else if (typeof options == 'object' || !options) {
// Check if any options were passed
var settings = $.extend({
checkedClass: _checked,
disabledClass: _disabled,
indeterminateClass: _indeterminate,
labelHover: true
}, options),
selector = settings.handle,
hoverClass = settings.hoverClass || 'hover',
focusClass = settings.focusClass || 'focus',
activeClass = settings.activeClass || 'active',
labelHover = !!settings.labelHover,
labelHoverClass = settings.labelHoverClass || 'hover',
// Setup clickable area
area = ('' + settings.increaseArea).replace('%', '') | 0;
// Selector limit
if (selector == _checkbox || selector == _radio) {
handle = 'input[type="' + selector + '"]';
}
// Clickable area limit
if (area < -50) {
area = -50;
}
// Walk around the selector
walker(this);
return stack.each(function() {
var self = $(this);
// If already customized
tidy(self);
var node = this,
id = node.id,
// Layer styles
offset = -area + '%',
size = 100 + (area * 2) + '%',
layer = {
position: 'absolute',
top: offset,
left: offset,
display: 'block',
width: size,
height: size,
margin: 0,
padding: 0,
background: '#fff',
border: 0,
opacity: 0
},
// Choose how to hide input
hide = _mobile ? {
position: 'absolute',
visibility: 'hidden'
} : area ? layer : {
position: 'absolute',
opacity: 0
},
// Get proper class
className = node[_type] == _checkbox ? settings.checkboxClass || 'i' + _checkbox : settings.radioClass || 'i' + _radio,
// Find assigned labels
label = $(_label + '[for="' + id + '"]').add(self.closest(_label)),
// Check ARIA option
aria = !!settings.aria,
// Set ARIA placeholder
ariaID = _iCheck + '-' + Math.random().toString(36).substr(2,6),
// Parent & helper
parent = '<div class="' + className + '" ' + (aria ? 'role="' + node[_type] + '" ' : ''),
helper;
// Set ARIA "labelledby"
if (aria) {
label.each(function() {
parent += 'aria-labelledby="';
if (this.id) {
parent += this.id;
} else {
this.id = ariaID;
parent += ariaID;
}
parent += '"';
});
}
// Wrap input
parent = self.wrap(parent + '/>')[_callback]('ifCreated').parent().append(settings.insert);
// Layer addition
helper = $('<ins class="' + _iCheckHelper + '"/>').css(layer).appendTo(parent);
// Finalize customization
self.data(_iCheck, {o: settings, s: self.attr('style')}).css(hide);
!!settings.inheritClass && parent[_add](node.className || '');
!!settings.inheritID && id && parent.attr('id', _iCheck + '-' + id);
parent.css('position') == 'static' && parent.css('position', 'relative');
operate(self, true, _update);
// Label events
if (label.length) {
label.on(_click + '.i mouseover.i mouseout.i ' + _touch, function(event) {
var type = event[_type],
item = $(this);
// Do nothing if input is disabled
if (!node[_disabled]) {
// Click
if (type == _click) {
if ($(event.target).is('a')) {
return;
}
operate(self, false, true);
// Hover state
} else if (labelHover) {
// mouseout|touchend
if (/ut|nd/.test(type)) {
parent[_remove](hoverClass);
item[_remove](labelHoverClass);
} else {
parent[_add](hoverClass);
item[_add](labelHoverClass);
}
}
if (_mobile) {
event.stopPropagation();
} else {
return false;
}
}
});
}
// Input events
self.on(_click + '.i focus.i blur.i keyup.i keydown.i keypress.i', function(event) {
var type = event[_type],
key = event.keyCode;
// Click
if (type == _click) {
return false;
// Keydown
} else if (type == 'keydown' && key == 32) {
if (!(node[_type] == _radio && node[_checked])) {
if (node[_checked]) {
off(self, _checked);
} else {
on(self, _checked);
}
}
return false;
// Keyup
} else if (type == 'keyup' && node[_type] == _radio) {
!node[_checked] && on(self, _checked);
// Focus/blur
} else if (/us|ur/.test(type)) {
parent[type == 'blur' ? _remove : _add](focusClass);
}
});
// Helper events
helper.on(_click + ' mousedown mouseup mouseover mouseout ' + _touch, function(event) {
var type = event[_type],
// mousedown|mouseup
toggle = /wn|up/.test(type) ? activeClass : hoverClass;
// Do nothing if input is disabled
if (!node[_disabled]) {
// Click
if (type == _click) {
operate(self, false, true);
// Active and hover states
} else {
// State is on
if (/wn|er|in/.test(type)) {
// mousedown|mouseover|touchbegin
parent[_add](toggle);
// State is off
} else {
parent[_remove](toggle + ' ' + activeClass);
}
// Label hover
if (label.length && labelHover && toggle == hoverClass) {
// mouseout|touchend
label[/ut|nd/.test(type) ? _remove : _add](labelHoverClass);
}
}
if (_mobile) {
event.stopPropagation();
} else {
return false;
}
}
});
});
} else {
return this;
}
};
// Do something with inputs
function operate(input, direct, method) {
var node = input[0],
state = /er/.test(method) ? _indeterminate : /bl/.test(method) ? _disabled : _checked,
active = method == _update ? {
checked: node[_checked],
disabled: node[_disabled],
indeterminate: input.attr(_indeterminate) == 'true' || input.attr(_determinate) == 'false'
} : node[state];
// Check, disable or indeterminate
if (/^(ch|di|in)/.test(method) && !active) {
on(input, state);
// Uncheck, enable or determinate
} else if (/^(un|en|de)/.test(method) && active) {
off(input, state);
// Update
} else if (method == _update) {
// Handle states
for (var each in active) {
if (active[each]) {
on(input, each, true);
} else {
off(input, each, true);
}
}
} else if (!direct || method == 'toggle') {
// Helper or label was clicked
if (!direct) {
input[_callback]('ifClicked');
}
// Toggle checked state
if (active) {
if (node[_type] !== _radio) {
off(input, state);
}
} else {
on(input, state);
}
}
}
// Add checked, disabled or indeterminate state
function on(input, state, keep) {
var node = input[0],
parent = input.parent(),
checked = state == _checked,
indeterminate = state == _indeterminate,
disabled = state == _disabled,
callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',
regular = option(input, callback + capitalize(node[_type])),
specific = option(input, state + capitalize(node[_type]));
// Prevent unnecessary actions
if (node[state] !== true) {
// Toggle assigned radio buttons
if (!keep && state == _checked && node[_type] == _radio && node.name) {
var form = input.closest('form'),
inputs = 'input[name="' + node.name + '"]';
inputs = form.length ? form.find(inputs) : $(inputs);
inputs.each(function() {
if (this !== node && $(this).data(_iCheck)) {
off($(this), state);
}
});
}
// Indeterminate state
if (indeterminate) {
// Add indeterminate state
node[state] = true;
// Remove checked state
if (node[_checked]) {
off(input, _checked, 'force');
}
// Checked or disabled state
} else {
// Add checked or disabled state
if (!keep) {
node[state] = true;
}
// Remove indeterminate state
if (checked && node[_indeterminate]) {
off(input, _indeterminate, false);
}
}
// Trigger callbacks
callbacks(input, checked, state, keep);
}
// Add proper cursor
if (node[_disabled] && !!option(input, _cursor, true)) {
parent.find('.' + _iCheckHelper).css(_cursor, 'default');
}
// Add state class
parent[_add](specific || option(input, state) || '');
// Set ARIA attribute
if (!!parent.attr('role') && !indeterminate) {
parent.attr('aria-' + (disabled ? _disabled : _checked), 'true');
}
// Remove regular state class
parent[_remove](regular || option(input, callback) || '');
}
// Remove checked, disabled or indeterminate state
function off(input, state, keep) {
var node = input[0],
parent = input.parent(),
checked = state == _checked,
indeterminate = state == _indeterminate,
disabled = state == _disabled,
callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',
regular = option(input, callback + capitalize(node[_type])),
specific = option(input, state + capitalize(node[_type]));
// Prevent unnecessary actions
if (node[state] !== false) {
// Toggle state
if (indeterminate || !keep || keep == 'force') {
node[state] = false;
}
// Trigger callbacks
callbacks(input, checked, callback, keep);
}
// Add proper cursor
if (!node[_disabled] && !!option(input, _cursor, true)) {
parent.find('.' + _iCheckHelper).css(_cursor, 'pointer');
}
// Remove state class
parent[_remove](specific || option(input, state) || '');
// Set ARIA attribute
if (!!parent.attr('role') && !indeterminate) {
parent.attr('aria-' + (disabled ? _disabled : _checked), 'false');
}
// Add regular state class
parent[_add](regular || option(input, callback) || '');
}
// Remove all traces
function tidy(input, callback) {
if (input.data(_iCheck)) {
// Remove everything except input
input.parent().html(input.attr('style', input.data(_iCheck).s || ''));
// Callback
if (callback) {
input[_callback](callback);
}
// Unbind events
input.off('.i').unwrap();
$(_label + '[for="' + input[0].id + '"]').add(input.closest(_label)).off('.i');
}
}
// Get some option
function option(input, state, regular) {
if (input.data(_iCheck)) {
return input.data(_iCheck).o[state + (regular ? '' : 'Class')];
}
}
// Capitalize some string
function capitalize(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
// Executable handlers
function callbacks(input, checked, callback, keep) {
if (!keep) {
if (checked) {
input[_callback]('ifToggled');
}
input[_callback]('ifChanged')[_callback]('if' + capitalize(callback));
}
}
})(window.jQuery || window.Zepto);