Plugin Directory

Changeset 1471418


Ignore:
Timestamp:
08/10/2016 09:43:24 AM (9 years ago)
Author:
tranthethang
Message:

1.2.1

  • Fix some CSS
Location:
kopatheme/trunk
Files:
1 added
15 edited

Legend:

Unmodified
Added
Removed
  • kopatheme/trunk/assets/css/admin.css

    r1470471 r1471418  
    4141  box-sizing: border-box;
    4242}
    43 
    4443#kopa_options_wrap a {
    4544  text-decoration: none;
    4645}
    47 
    4846#kopa_options_wrap a:hover, #kopa_options_wrap a:focus {
    4947  text-decoration: none;
    5048  outline: none;
    5149}
    52 
    5350#kopa_options_wrap input[type="text"], #kopa_options_wrap input[type="email"], #kopa_options_wrap input[type="number"], #kopa_options_wrap input[type="password"], #kopa_options_wrap input[type="url"] {
    5451  margin: 0;
    5552}
    56 
    5753#kopa_options_wrap textarea {
    5854  height: 160px;
    5955  /*margin-bottom: 15px;*/
    6056}
    61 
    6257#kopa_options_wrap .kopa_sidebar_body,
    6358#kopa_options_wrap .kopa_sidebar_before_widget,
     
    6863  display: none;
    6964}
    70 
    7165#kopa_options_wrap .kopa_hide {
    7266  display: none;
    7367}
    74 
    7568#kopa_options_wrap .kopa_tab_content {
    7669  min-height: 900px;
    7770}
    78 
    7971#kopa_options_wrap .postbox {
    8072  padding: 0 0 30px 200px;
     
    8779  margin-top: 65px;
    8880}
    89 
    9081#kopa_options_wrap #kopa-logo {
    9182  position: absolute;
     
    9586  z-index: 9;
    9687}
    97 
    9888#kopa_options_wrap .kopa_nav_tabs {
    9989  margin: 0;
     
    10393  z-index: 1;
    10494}
    105 
    10695#kopa_options_wrap .kopa_nav_tabs li {
    10796  margin-bottom: 0;
     
    111100  cursor: pointer;
    112101}
    113 
    114102#kopa_options_wrap .kopa_nav_tabs li.kopa_nav_active, #kopa_options_wrap .kopa_nav_tabs li:hover {
    115103  background: #1189c4;
    116104}
    117 
    118105#kopa_options_wrap .kopa_nav_tabs li.kopa_nav_active:before, #kopa_options_wrap .kopa_nav_tabs li:hover:before {
    119106  display: inline-block;
     
    131118  font-size: 16px;
    132119}
    133 
    134120#kopa_options_wrap .kopa_nav_tabs a {
    135121  color: #fff;
     
    137123  display: inline-block;
    138124}
    139 
    140125#kopa_options_wrap .kopa_nav_tabs:before {
    141126  content: '';
     
    148133  left: 0;
    149134}
    150 
    151135#kopa_options_wrap .kopa_nav_tabs span {
    152136  color: #fff;
    153137  margin-right: 10px;
    154138}
    155 
    156139#kopa_options_wrap .kopa_nav_tab_wrapper {
    157140  background: #fff;
     
    167150  border-bottom: 1px solid #d3d7da;
    168151}
    169 
    170152#kopa_options_wrap .kopa_nav_tab_wrapper .kopa_nav_tab {
    171153  border-right: 1px solid #d3d7da;
     
    177159  text-transform: uppercase;
    178160}
    179 
    180161#kopa_options_wrap .kopa_nav_tab_wrapper .kopa_nav_tab:first-child {
    181162  border-left: none;
    182163}
    183 
    184164#kopa_options_wrap .kopa_nav_tab_wrapper .kopa_nav_tab.kopa_nav_tab_active {
    185165  background: #fff;
    186166}
    187 
    188167#kopa_options_wrap .kopa_nav_tab_wrapper .kopa_nav_tab:hover {
    189168  background: #fff;
    190169}
    191 
    192170#kopa_options_wrap .kopa_tab_content {
    193171  background: #fff;
    194172  padding: 0 20px;
    195173}
    196 
    197174#kopa_options_wrap .kopa_tab_content .kopa_heading {
    198175  font-size: 14px;
     
    204181  line-height: 1.4;
    205182}
    206 
    207183#kopa_options_wrap .kopa_tab_content .kopa_description {
    208184  margin-bottom: 10px;
     
    210186  font-size: 11px;
    211187}
    212 
    213188#kopa_options_wrap .kopa_tab_content .kopa_description p {
    214189  font-size: 11px;
    215190}
    216 
    217191#kopa_options_wrap .kopa_tab_content .kopa_section {
    218192  padding: 20px;
     
    220194  margin-top: -1px;
    221195}
    222 
    223196#kopa_options_wrap .kopa_section_group {
    224197  position: relative;
     
    226199  border: 1px solid #d3d7da;
    227200}
    228 
    229201#kopa_options_wrap .kopa_section_group .kopa_section_group {
    230202  margin: 20px;
    231203}
    232 
    233204#kopa_options_wrap .kopa_section_group .kopa_section {
    234205  border-width: 0 0 1px 0;
    235206}
    236 
    237207#kopa_options_wrap .kopa_section_group .kopa_section:last-child {
    238208  border-width: 0;
    239209}
    240 
    241210#kopa_options_wrap .kopa_section_group.kopa_section_group_layout .kopa_section,
    242211#kopa_options_wrap .kopa_section_group.kopa_section_group_layout .kopa_section:last-child {
    243212  border-width: 1px;
    244213}
    245 
    246214#kopa_options_wrap .kopa_heading_group {
    247215  position: absolute;
     
    259227  line-height: 1.4;
    260228}
    261 
    262229#kopa_options_wrap .kopa_controls {
    263230  position: relative;
    264231}
    265 
    266232#kopa_options_wrap .kopa_controls select {
    267233  margin: 0;
    268234}
    269 
    270235#kopa_options_wrap .kopa_controls #multi-select-field {
    271236  height: auto;
    272237}
    273 
    274238#kopa_options_wrap .kopa_controls .kopa_sidebar_add_button {
    275239  position: absolute;
     
    288252  background: linear-gradient(to bottom, #499bea 0%, #207ce5 100%);
    289253  /* W3C */
    290   filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#499bea', endColorstr='#207ce5',GradientType=0 );
     254  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#499bea', endColorstr='#207ce5',GradientType=0 );
    291255  /* IE6-9 */
    292256  border: none;
     
    308272  right: 5px;
    309273}
    310 
    311274#kopa_options_wrap .kopa_controls .kopa_sidebar_add_button:hover {
    312275  background: #ff1a00;
     
    324287  background: linear-gradient(to bottom, #ff1a00 0%, #ff1a00 100%);
    325288  /* W3C */
    326   filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff1a00', endColorstr='#ff1a00',GradientType=0 );
     289  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff1a00', endColorstr='#ff1a00',GradientType=0 );
    327290  /* IE6-9 */
    328291  color: #fff;
    329292}
    330 
    331293#kopa_options_wrap .kopa_controls .kopa_upload_button, #kopa_options_wrap .kopa_controls .kopa_remove_file {
    332294  position: absolute;
     
    338300  border-radius: 0;
    339301}
    340 
    341302#kopa_options_wrap .kopa_controls .kopa_upload_button:hover, #kopa_options_wrap .kopa_controls .kopa_remove_file:hover {
    342303  background: #fafafa;
    343304}
    344 
    345305#kopa_options_wrap .kopa_controls .wp-color-picker {
    346306  font-size: 12px;
     
    353313  display: inline-block;
    354314}
    355 
    356315#kopa_options_wrap .kopa_controls .kopa_select_font,
    357316#kopa_options_wrap .kopa_controls .kopa_select_font_style,
     
    361320  margin-right: 20px;
    362321}
    363 
    364322#kopa_options_wrap .kopa_controls .kopa_select_font {
    365323  width: 300px;
    366324}
    367 
    368325#kopa_options_wrap .kopa_controls .kopa_select_font optgroup {
    369326  width: 280px;
    370327}
    371 
    372328#kopa_options_wrap .kopa_controls .kopa_select_font_style {
    373329  width: 120px;
    374330}
    375 
    376331#kopa_options_wrap .kopa_controls .kopa_select_font_size {
    377332  width: 100px;
    378333}
    379 
    380334#kopa_options_wrap .kopa_section_multiselect select {
    381335  height: 150px;
    382336}
    383 
    384337#kopa_options_wrap #kopa_options_submit, #kopa_options_wrap #kopa_options_submit_top {
    385338  padding: 8px 20px;
     
    388341  border: 1px solid #d3d7da;
    389342}
    390 
    391343#kopa_options_wrap input[type="submit"] {
    392344  background: #499bea;
     
    404356  background: linear-gradient(to bottom, #499bea 0%, #207ce5 100%);
    405357  /* W3C */
    406   filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#499bea', endColorstr='#207ce5',GradientType=0 );
     358  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#499bea', endColorstr='#207ce5',GradientType=0 );
    407359  /* IE6-9 */
    408360  border: none;
     
    420372  transition: all .3s;
    421373}
    422 
    423374#kopa_options_wrap input[type="submit"]:hover {
    424375  background: #ff1a00;
     
    436387  background: linear-gradient(to bottom, #ff1a00 0%, #ff1a00 100%);
    437388  /* W3C */
    438   filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff1a00', endColorstr='#ff1a00',GradientType=0 );
     389  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff1a00', endColorstr='#ff1a00',GradientType=0 );
    439390  /* IE6-9 */
    440391  color: #fff;
    441392}
    442 
    443393#kopa_options_wrap .kopa_group_content {
    444394  padding-top: 1px;
    445395}
    446 
    447396#kopa_options_wrap .kopa_section_layout_image {
    448397  padding-left: 20px;
     
    450399  width: 65%;
    451400}
    452 
    453401#kopa_options_wrap .kopa_section_layout_image img {
    454402  display: block;
     
    456404  height: auto;
    457405}
    458 
    459406#kopa_options_wrap .kopa_section_select_layout, #kopa_options_wrap .kopa_section_select_area_container {
    460407  float: left;
    461408  width: 35%;
    462409}
    463 
    464410#kopa_options_wrap .kopa_section_group_layout {
    465411  padding: 20px;
    466412  border: 1px solid #d3d7da;
    467413}
    468 
    469414#kopa_options_wrap .kopa_section_group_layout .kopa_section {
    470415  padding: 15px 20px 20px;
    471416}
    472 
    473417#kopa_options_wrap .kopa_section_group_layout .kopa_section_select_layout {
    474418  margin-bottom: 10px;
    475419}
    476 
    477420#kopa_options_wrap #blog {
    478421  margin-top: 40px;
    479422}
    480 
    481423#kopa_options_wrap .iris-picker {
    482424  box-sizing: content-box;
    483425}
    484 
    485426#kopa_options_wrap .wp-color-result, #kopa_options_wrap .ui-slider-handle {
    486427  box-sizing: content-box;
    487428}
    488 
    489429#kopa_options_wrap .kopa_google_font_preview {
    490430  float: left;
     
    492432  margin: 25px 0 0;
    493433}
    494 
    495434#kopa_options_wrap .kopa_select_custom_font {
    496435  position: relative;
     
    499438  margin-top: 20px;
    500439}
    501 
    502440#kopa_options_wrap .kopa_select_custom_font input[type="text"] {
    503441  float: left;
    504442  margin: 0;
    505443}
    506 
    507444#kopa_options_wrap .kopa_select_custom_font input[type="text"].kopa_select_custom_font_name {
    508445  margin-right: 20px;
    509446  width: 300px;
    510447}
    511 
    512448#kopa_options_wrap .kopa_select_custom_font input[type="text"].kopa_select_custom_font_url {
    513449  width: 544px;
    514450  padding-right: 80px;
    515451}
    516 
    517452#kopa_options_wrap .kopa_select_font {
    518453  border: 1px solid #d3d7da !important;
    519454}
    520 
    521455#kopa_options_wrap .kopa_screenshot {
    522456  position: relative;
    523457  display: inline-block;
    524458}
    525 
    526459#kopa_options_wrap .kopa_screenshot img {
    527460  max-width: 300px;
     
    530463  margin-top: 20px;
    531464}
    532 
    533465#kopa_options_wrap .kopa_screenshot .kopa_remove_image {
    534466  position: absolute;
     
    539471  font-size: 0;
    540472}
    541 
    542473#kopa_options_wrap .kopa_screenshot .kopa_remove_image:before {
    543474  content: "\f00d";
     
    551482  font-size: 20px;
    552483}
    553 
    554484#kopa_options_wrap .kopa_screenshot.kopa_hide {
    555485  display: none;
    556486}
    557 
    558487#kopa_options_wrap .kopa_reset, #kopa_options_wrap .kopa_export {
    559488  margin-top: 20px;
    560489}
    561 
    562490#kopa_options_wrap .kopa_sidebar_header {
    563491  text-align: right;
    564492  cursor: move;
    565493}
    566 
    567494#kopa_options_wrap .kopa_sidebar_header > a {
    568495  margin-left: 10px;
    569496}
    570 
    571497#kopa_options_wrap .kopa_sidebar_header strong {
    572498  float: left;
    573499}
    574 
    575500#kopa_options_wrap .kopa_sidebar_body > label {
    576501  margin: 0;
    577502  display: block;
    578503}
    579 
    580504#kopa_options_wrap .kopa_sidebar_body .kopa_sidebar {
    581505  margin-top: 10px;
    582506}
    583 
    584507#kopa_options_wrap .kopa_sidebar_sortable {
    585508  margin: 20px 0 0;
    586509}
    587 
    588510#kopa_options_wrap .kopa_sidebar_sortable > li {
    589511  margin-top: 20px;
     
    594516  border: none;
    595517}
    596 
    597518#kopa_options_wrap .kopa_sidebar_sortable > li:first-child {
    598519  margin-top: 0;
    599520}
    600 
    601521#kopa_options_wrap .kopa_sidebar_sortable .kopa_sidebar_header {
    602522  border: 1px solid #d3d7da;
     
    607527  transition: all .3s;
    608528}
    609 
    610529#kopa_options_wrap .kopa_sidebar_sortable .kopa_sidebar_header:hover {
    611530  border-color: #444;
    612531  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    613532}
    614 
    615533#kopa_options_wrap .kopa_sidebar_sortable .kopa_sidebar_header a {
    616534  position: absolute;
     
    629547  background: linear-gradient(to bottom, #499bea 0%, #207ce5 100%);
    630548  /* W3C */
    631   filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#499bea', endColorstr='#207ce5',GradientType=0 );
     549  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#499bea', endColorstr='#207ce5',GradientType=0 );
    632550  /* IE6-9 */
    633551  border: none;
     
    649567  right: 5px;
    650568}
    651 
    652569#kopa_options_wrap .kopa_sidebar_sortable .kopa_sidebar_header a:hover {
    653570  background: #ff1a00;
     
    665582  background: linear-gradient(to bottom, #ff1a00 0%, #ff1a00 100%);
    666583  /* W3C */
    667   filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff1a00', endColorstr='#ff1a00',GradientType=0 );
     584  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff1a00', endColorstr='#ff1a00',GradientType=0 );
    668585  /* IE6-9 */
    669586  color: #fff;
    670587}
    671 
    672588#kopa_options_wrap .kopa_sidebar_sortable .kopa_sidebar_header .kopa_sidebar_edit_button {
    673589  right: 92px;
    674590}
    675 
    676591#kopa_options_wrap .kopa_sidebar_sortable .kopa_sidebar_body {
    677592  padding: 20px;
     
    679594  border-top: none;
    680595}
    681 
    682596#kopa_options_wrap .kopa_sidebar_sortable .kopa_sidebar_body .kopa_sidebar_control_actions {
    683597  margin-top: 10px;
    684598}
    685 
    686599#kopa_options_wrap .kopa_sidebar_sortable .kopa_sidebar_body .kopa_sidebar_control_actions .spinner {
    687600  margin-top: 0;
    688601  margin-right: 700px;
    689602}
    690 
    691603#kopa_options_wrap .kopa_section_import input[type="file"] {
    692604  border: 1px solid #d3d7da;
     
    694606  padding: 8px 0 8px 6px;
    695607}
    696 
    697608@-moz-document url-prefix() {
    698609  #kopa_options_wrap .kopa_section_import input[type="file"] {
     
    700611  }
    701612}
    702 
    703613#kopa_options_wrap .kopa_sidebar_header .spinner {
    704614  margin-top: 0;
    705615  margin-right: 150px;
    706616}
    707 
    708617#kopa_options_wrap .kopa_section_custom_font_manager .kopa_custom_font_item {
    709618  margin-bottom: 20px;
    710619  position: relative;
    711620}
    712 
    713621#kopa_options_wrap .kopa_section_custom_font_manager .kopa_custom_font_item:first-child {
    714622  margin-top: 0;
    715623}
    716 
    717624#kopa_options_wrap .kopa_section_custom_font_manager .kopa_custom_font_title {
    718625  background-color: #f8f8f8;
     
    730637  transition: all .3s;
    731638}
    732 
    733639#kopa_options_wrap .kopa_section_custom_font_manager .kopa_custom_font_title:hover {
    734640  border-color: #444;
    735641  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    736642}
    737 
    738643#kopa_options_wrap .kopa_section_custom_font_manager .kopa_section {
    739644  padding: 0;
     
    741646  margin-bottom: 10px;
    742647}
    743 
    744648#kopa_options_wrap .kopa_section_custom_font_manager .kopa_custom_font_inside.kopa_hide {
    745649  border: 1px solid #d3d7da;
     
    747651  padding: 20px;
    748652}
    749 
    750653#kopa_options_wrap .kopa_section_custom_font_manager .kopa_custom_font_top {
    751654  position: relative;
    752655}
    753 
    754656#kopa_options_wrap .kopa_custom_font_title_action, #kopa_options_wrap .kopa_sidebar_title_action {
    755657  position: absolute;
     
    761663  z-index: 9999;
    762664}
    763 
    764665#kopa_options_wrap .kopa_custom_font_title_action:before, #kopa_options_wrap .kopa_sidebar_title_action:before {
    765666  display: inline-block;
     
    776677  font-size: 20px/1;
    777678}
    778 
    779679#kopa_options_wrap .kopa_custom_font_title_action.kopa_action_close:before, #kopa_options_wrap .kopa_sidebar_title_action.kopa_action_close:before {
    780680  content: "\f0d8";
    781681}
    782 
    783682#kopa_options_wrap .kopa_sidebar_add_button.kopa_button_inactive {
    784683  cursor: default;
    785684  background: #ccc;
    786685}
    787 
    788686#kopa_options_wrap .kopa_sidebar_add_button.kopa_button_inactive:hover {
    789687  background: #ccc;
    790688}
    791 
    792689#kopa_options_wrap .ui-sortable-placeholder {
    793690  border: 1px dashed #d3d7da !important;
     
    796693  box-shadow: none !important;
    797694}
    798 
    799695#kopa_options_wrap .ui-sortable-helper {
    800696  opacity: 0.8;
    801697}
    802 
    803698#kopa_options_wrap .kopa_options_sidebar {
    804699  position: absolute;
     
    809704  height: 100%;
    810705}
    811 
    812706#kopa_options_wrap .kopa_sidebar_menu_mobile_icon {
    813707  display: none;
     
    817711  width: device-width;
    818712}
    819 
    820713@viewport {
    821714  width: device-width;
    822715}
    823 
    824716.kopa-widget-block {
    825717  margin-top: 12px;
     
    830722  overflow: hidden;
    831723}
    832 
    833724.kopa_section_group_layout .kopa_section_layout_image img {
    834725  padding: 2px;
     
    882773  }
    883774}
    884 
    885775@media only screen and (min-width: 1280px) and (max-width: 1366px) {
    886776  #kopa_options_wrap .kopa_nav_tab_wrapper .kopa_nav_tab {
     
    888778  }
    889779}
    890 
    891780@media only screen and (min-width: 1024px) and (max-width: 1279px) {
    892781  #kopa_options_wrap .kopa_nav_tab_wrapper .kopa_nav_tab {
     
    894783  }
    895784}
    896 
    897 /*
    898  Author     : vutuan.sw
    899 */
    900 .kopa-field.kopa-field-image {
    901   position: relative;
    902 }
    903 
    904 .kopa-field.kopa-field-image.hasimage .item-add {
    905   border: none;
    906 }
    907 
    908 .kopa-field.kopa-field-image .item-add {
    909   display: block;
    910   height: 102px;
    911   overflow: hidden;
    912   position: relative;
    913   border: 1px dashed rgba(125, 125, 125, 0.4);
    914 }
    915 
    916 .kopa-field.kopa-field-image .item-add:before {
    917   content: "";
    918   display: block;
    919   width: 39px;
    920   height: 38px;
    921   background-image: url("../images/empty_row_sprite.png");
    922   background-position: top center;
    923   background-repeat: no-repeat;
    924   cursor: pointer;
    925   border: none !important;
    926   position: absolute;
    927   top: 0px;
    928   left: 0px;
    929   right: 0px;
    930   bottom: 0px;
    931   margin: auto;
    932 }
    933 
    934 .kopa-field.kopa-field-image .item-add:hover:before {
    935   background-position: bottom center;
    936 }
    937 
    938 .kopa-field.kopa-field-image .item-add .img {
    939   width: 100%;
    940   height: 100%;
    941   background-size: cover;
    942   background-position: center;
    943 }
    944 
    945 .kopa-field.kopa-field-image .item-remove {
    946   display: none;
    947   position: absolute;
    948   top: 1px;
    949   right: 1px;
    950   width: 25px;
    951   height: 25px;
    952   background: url("../images/remove.png") no-repeat;
    953   background-size: 10px;
    954   background-position: center;
    955   display: none;
    956   cursor: pointer;
    957   border: none;
    958 }
    959 
    960 .kopa-field img {
    961   border: 1px solid #d5d5d5;
    962   max-width: 100%;
    963 }
    964 
    965 .kopa-field.hasimage:hover .item-remove {
    966   display: block;
    967 }
    968 
    969 .kopa-field.hasimage .item-add:before {
    970   display: none;
    971 }
    972 
    973 .kopa-field.header_image a img {
    974   height: auto;
    975   position: absolute;
    976 }
    977 
    978 .kopa-field-caption h4 {
    979   text-transform: uppercase;
    980   font-weight: bold;
    981   font-size: 1.2em;
    982   margin: 15px 0px 15px  0px;
    983 }
    984 
    985 .kopa-metabox-wrapper .kopa-field-caption h4 {
    986   padding-right: 15px;
    987   padding-left: 15px;
    988 }
  • kopatheme/trunk/assets/css/admin.scss

    r1470471 r1471418  
    728728    }
    729729}
    730 
    731 @import '_image_field';
    732 
    733 .kopa-field-caption h4{
    734     text-transform: uppercase;
    735     font-weight: bold;
    736     font-size: 1.2em;
    737     margin: 15px 0px 15px  0px;
    738 }
    739 
    740 .kopa-metabox-wrapper{
    741     .kopa-field-caption h4{
    742         padding-right: 15px;
    743         padding-left: 15px;
    744     }
    745 }
  • kopatheme/trunk/assets/css/custom-layout.scss

    r1470471 r1471418  
    55 *  and layout manager pages
    66 */
     7
    78$border:#d3d7da;
    89$bg:#f8f8f8;
     
    143144    }
    144145}
    145 
    146 @import '_image_field';
    147 
    148 .kopa-field-caption h4{
    149     text-transform: uppercase;
    150     font-weight: bold;
    151     font-size: 1.2em;
    152     margin: 15px 0px 15px  0px;
    153 }
    154 
    155 .kopa-metabox-wrapper{
    156     .kopa-field-caption h4{
    157         padding-right: 15px;
    158         padding-left: 15px;
    159     }
    160 }
  • kopatheme/trunk/assets/css/widget.css

    r1470471 r1471418  
     1/*
     2 Author     : vutuan.sw
     3*/
     4.kopa-field.kopa-field-image {
     5  position: relative;
     6}
     7.kopa-field.kopa-field-image.hasimage .item-add {
     8  border: none;
     9}
     10.kopa-field.kopa-field-image .item-add {
     11  display: block;
     12  height: 102px;
     13  overflow: hidden;
     14  position: relative;
     15  border: 1px dashed rgba(125, 125, 125, 0.4);
     16}
     17.kopa-field.kopa-field-image .item-add:before {
     18  content: "";
     19  display: block;
     20  width: 39px;
     21  height: 38px;
     22  background-image: url("../images/empty_row_sprite.png");
     23  background-position: top center;
     24  background-repeat: no-repeat;
     25  cursor: pointer;
     26  border: none !important;
     27  position: absolute;
     28  top: 0px;
     29  left: 0px;
     30  right: 0px;
     31  bottom: 0px;
     32  margin: auto;
     33}
     34.kopa-field.kopa-field-image .item-add:hover:before {
     35  background-position: bottom center;
     36}
     37.kopa-field.kopa-field-image .item-add .img {
     38  width: 100%;
     39  height: 100%;
     40  background-size: cover;
     41  background-position: center;
     42}
     43.kopa-field.kopa-field-image .item-remove {
     44  display: none;
     45  position: absolute;
     46  top: 1px;
     47  right: 1px;
     48  width: 25px;
     49  height: 25px;
     50  background: url("../images/remove.png") no-repeat;
     51  background-size: 10px;
     52  background-position: center;
     53  display: none;
     54  cursor: pointer;
     55  border: none;
     56}
     57.kopa-field img {
     58  border: 1px solid #d5d5d5;
     59  max-width: 100%;
     60}
     61.kopa-field.hasimage:hover .item-remove {
     62  display: block;
     63}
     64.kopa-field.hasimage .item-add:before {
     65  display: none;
     66}
     67.kopa-field.header_image a img {
     68  height: auto;
     69  position: absolute;
     70}
     71
    172.clearfix:before, .clearfix:after {
    273  content: " ";
  • kopatheme/trunk/assets/css/widget.scss

    r1470471 r1471418  
     1@import 'image_field';
     2
    13.clearfix:before, .clearfix:after {
    24    content: " ";
     
    15161518    box-shadow: 0px 0px 5px #666666;
    15171519}
     1520
  • kopatheme/trunk/assets/js/admin-layout.min.js

    r1353276 r1471418  
    1 /**
    2  * Kopa Framework Admin Dynamic Select Layout
    3  * Author: Kopatheme
    4  * Copyright: 2014 Kopatheme
    5  * License: GPLv2 or later
    6  */
    7 jQuery(document).ready(function(a){function b(){var c=a(this),d=c.data("layout-section-id"),e=c.val()?c.val():c.find("option:first").val();a("#"+d+"_"+e).show().siblings(".kopa_section_select_area_container").hide(),a("#"+d+"_"+e+"_image").show().siblings(".kopa_section_layout_image").hide()}a(".kopa_section_select_area_container").hide(),a(".kopa_section_layout_image").hide(),a(".kopa_section_select_layout select").each(b),a(".kopa_section_select_layout select").on("change",b)});
     1jQuery(document).ready(function(e){function a(){var a=e(this),o=a.data("layout-section-id"),i=a.val()?a.val():a.find("option:first").val();e("#"+o+"_"+i).show().siblings(".kopa_section_select_area_container").hide(),e("#"+o+"_"+i+"_image").show().siblings(".kopa_section_layout_image").hide()}e(".kopa_section_select_area_container").hide(),e(".kopa_section_layout_image").hide(),e(".kopa_section_select_layout select").each(a),e(".kopa_section_select_layout select").on("change",a)});
  • kopatheme/trunk/assets/js/admin-sidebar.min.js

    r1353276 r1471418  
    1 /**
    2  * Kopa Framework Admin Dynamic Sidebar JS
    3  * Author: Kopatheme
    4  * Copyright: 2014 Kopatheme
    5  * License: GPLv2 or later
    6  * Used localized variable: kopa_sidebar_attributes_l10n
    7  */
    8 jQuery(document).ready(function(a){function b(){var c=a(this),d=c.siblings(".kopa_sidebar_add_button");return c.val()?(d.removeClass("kopa_button_inactive"),void 0):(d.addClass("kopa_button_inactive"),void 0)}function c(b){b.preventDefault();var c=a(this),d=c.find(".kopa_sidebar_title_action");d.hasClass("kopa_action_close")?d.removeClass("kopa_action_close"):d.addClass("kopa_action_close"),c.siblings(".kopa_sidebar_body").slideToggle("fast")}function d(b){b.preventDefault();var c=a(this),d=c.parents(".kopa_sidebar_body"),e=d.siblings(".kopa_sidebar_header"),f=e.find(".kopa_sidebar_title_action");d.slideUp("fast"),f.removeClass("kopa_action_close")}function e(b){b.preventDefault();var e=a(this),g=e.siblings(".kopa_sidebar_add_field"),h=g.val(),j=e.data("registered-sidebars")+1,k=e.data("register-sidebar-ids"),l="sidebar-"+j,m=e.data("name"),n=e.data("container-id"),o=a("#"+n),p="";if(!e.hasClass("kopa_button_inactive")&&""!==h){for(;k.search(l)>=0;)j++,l="sidebar-"+j;p='<li class="kopa_sidebar">',p+='<div class="kopa_sidebar_header">',p+='<div class="kopa_sidebar_title_action"></div>',p+="<strong>"+h+"</strong>",p+="</div>",p+='<div class="kopa_sidebar_body">';var q=kopa_sidebar_attributes_l10n.attributes;p+='<label><input class="kopa_sidebar_advanced_settings" type="checkbox"> '+kopa_sidebar_attributes_l10n.advanced_settings+"</label>";for(var r in q)p+='<div class="kopa_sidebar_'+r+'">',p+='<input type="text" class="kopa_sidebar kopa_sidebar_attr" name="'+m+"["+l+"]["+r+']" id="kopa_sidebar_'+j+"_"+r+'" '+("name"===r?'value="'+h+'"':"")+' placeholder="'+q[r]+'">',p+="</div>";p+='<div class="kopa_sidebar_control_actions">',p+='<a class="kopa_sidebar_delete_button" href="#">'+kopa_sidebar_attributes_l10n.remove+"</a>",p+=" | ",p+='<a class="kopa_sidebar_close_button" href="#">'+kopa_sidebar_attributes_l10n.close+"</a>",p+='<span class="spinner"></span>',p+="</div>",p+="</div>",p+="</li>",o.append(p);var s=o.children("li:last");viewportTop=a(window).scrollTop(),viewportBottom=a(window).scrollTop()+a(window).height(),sidebarBounds=s.offset(),$newElementHeader=s.children(".kopa_sidebar_header"),$newElementBody=s.children(".kopa_sidebar_body"),$newElementTitleAction=s.find(".kopa_sidebar_title_action"),$newElementCloseButton=s.find(".kopa_sidebar_close_button"),$newElementDeleteButton=s.find(".kopa_sidebar_delete_button"),$newElementAdvancedButton=s.find(".kopa_sidebar_advanced_settings"),$newElementTitleAction.addClass("kopa_action_close"),viewportBottom<sidebarBounds.top?a("html, body").animate({scrollTop:s.offset().top-130},{duration:200,complete:function(){$newElementBody.slideDown("fast")}}):$newElementBody.slideDown("fast"),e.data("registered-sidebars",j),g.val(""),e.addClass("kopa_button_inactive"),$newElementHeader.on("click",c),$newElementCloseButton.on("click",d),$newElementDeleteButton.on("click",f),$newElementAdvancedButton.on("click",i)}}function f(b){b.preventDefault();var c=a(this),d=c.data("sidebar-id"),e="<strong>"+kopa_sidebar_attributes_l10n.confirm_message+"</strong>";d?a.ajax({url:kopa_sidebar_attributes_l10n.ajax_url,type:"POST",data:{action:"kopa_remove_sidebar",sidebar_id:d},beforeSend:function(){c.siblings(".spinner").show()},success:function(b){c.siblings(".spinner").hide(),b=a.parseJSON(b);var d=b.allow_delete,f=b.warnings,h=b.errors,i="";d?(f.push(e),i=f.join("<br>"),g("confirm",c,kopa_sidebar_attributes_l10n.warning,i)):(i+=h.join("<br>"),g("alert",c,kopa_sidebar_attributes_l10n.error,i))}}):g("confirm",c,kopa_sidebar_attributes_l10n.info,e)}function g(b,c,d,e){var f=a("#kopa_modal_info"),g=f.find("#kopa_modal_confirm"),i=g.find("#kopa_confirm_ok"),j=g.find("#kopa_confirm_cancel");"confirm"!=b?g.hide():g.show(),f.find(".kopa_modal_info").empty().append(e),tb_show(d,"#TB_inline?width=450&height=420&inlineId=kopa_modal_info"),i.off("click",h).on("click",{allowDelete:!0,selector:c},h),j.off("click",h).on("click",{allowDelete:!1,selector:c},h)}function h(b){b.preventDefault();var c=b.data.allowDelete,d=b.data.selector;c&&d.parents(".kopa_sidebar").slideUp("fast",function(){a(this).remove()}),tb_remove()}function i(){var c=a(this);c.parent().siblings(".kopa_sidebar_before_widget, .kopa_sidebar_after_widget, .kopa_sidebar_before_title, .kopa_sidebar_after_title").slideToggle("fast")}a(".kopa_sidebar_sortable").sortable({handle:".kopa_sidebar_header"}),a(".kopa_sidebar_add_field").on("keyup",b),a(".kopa_sidebar_add_button").on("click",e),a(".kopa_sidebar_header").on("click",c),a(".kopa_sidebar_close_button").on("click",d),a(".kopa_sidebar_delete_button").on("click",f),a(".kopa_sidebar_advanced_settings").on("click",i)});
     1jQuery(document).ready(function(e){function a(){var a=e(this),i=a.siblings(".kopa_sidebar_add_button");return a.val()?(i.removeClass("kopa_button_inactive"),void 0):(i.addClass("kopa_button_inactive"),void 0)}function i(a){a.preventDefault();var i=e(this),t=i.find(".kopa_sidebar_title_action");t.hasClass("kopa_action_close")?t.removeClass("kopa_action_close"):t.addClass("kopa_action_close"),i.siblings(".kopa_sidebar_body").slideToggle("fast")}function t(a){a.preventDefault();var i=e(this),t=i.parents(".kopa_sidebar_body"),o=t.siblings(".kopa_sidebar_header"),s=o.find(".kopa_sidebar_title_action");t.slideUp("fast"),s.removeClass("kopa_action_close")}function o(a){a.preventDefault();var o=e(this),n=o.siblings(".kopa_sidebar_add_field"),d=n.val(),_=o.data("registered-sidebars")+1,l=o.data("register-sidebar-ids"),c="sidebar-"+_,b=o.data("name"),p=o.data("container-id"),k=e("#"+p),f="";if(!o.hasClass("kopa_button_inactive")&&""!==d){for(;l.search(c)>=0;)_++,c="sidebar-"+_;f='<li class="kopa_sidebar">',f+='<div class="kopa_sidebar_header">',f+='<div class="kopa_sidebar_title_action"></div>',f+="<strong>"+d+"</strong>",f+="</div>",f+='<div class="kopa_sidebar_body">';var u=kopa_sidebar_attributes_l10n.attributes;f+='<label><input class="kopa_sidebar_advanced_settings" type="checkbox"> '+kopa_sidebar_attributes_l10n.advanced_settings+"</label>";for(var v in u)f+='<div class="kopa_sidebar_'+v+'">',f+='<input type="text" class="kopa_sidebar kopa_sidebar_attr" name="'+b+"["+c+"]["+v+']" id="kopa_sidebar_'+_+"_"+v+'" '+("name"===v?'value="'+d+'"':"")+' placeholder="'+u[v]+'">',f+="</div>";f+='<div class="kopa_sidebar_control_actions">',f+='<a class="kopa_sidebar_delete_button" href="#">'+kopa_sidebar_attributes_l10n.remove+"</a>",f+=" | ",f+='<a class="kopa_sidebar_close_button" href="#">'+kopa_sidebar_attributes_l10n.close+"</a>",f+='<span class="spinner"></span>',f+="</div>",f+="</div>",f+="</li>",k.append(f);var m=k.children("li:last");viewportTop=e(window).scrollTop(),viewportBottom=e(window).scrollTop()+e(window).height(),sidebarBounds=m.offset(),$newElementHeader=m.children(".kopa_sidebar_header"),$newElementBody=m.children(".kopa_sidebar_body"),$newElementTitleAction=m.find(".kopa_sidebar_title_action"),$newElementCloseButton=m.find(".kopa_sidebar_close_button"),$newElementDeleteButton=m.find(".kopa_sidebar_delete_button"),$newElementAdvancedButton=m.find(".kopa_sidebar_advanced_settings"),$newElementTitleAction.addClass("kopa_action_close"),viewportBottom<sidebarBounds.top?e("html, body").animate({scrollTop:m.offset().top-130},{duration:200,complete:function(){$newElementBody.slideDown("fast")}}):$newElementBody.slideDown("fast"),o.data("registered-sidebars",_),n.val(""),o.addClass("kopa_button_inactive"),$newElementHeader.on("click",i),$newElementCloseButton.on("click",t),$newElementDeleteButton.on("click",s),$newElementAdvancedButton.on("click",r)}}function s(a){a.preventDefault();var i=e(this),t=i.data("sidebar-id"),o="<strong>"+kopa_sidebar_attributes_l10n.confirm_message+"</strong>";t?e.ajax({url:kopa_sidebar_attributes_l10n.ajax_url,type:"POST",data:{action:"kopa_remove_sidebar",sidebar_id:t},beforeSend:function(){i.siblings(".spinner").show()},success:function(a){i.siblings(".spinner").hide(),a=e.parseJSON(a);var t=a.allow_delete,s=a.warnings,d=a.errors,r="";t?(s.push(o),r=s.join("<br>"),n("confirm",i,kopa_sidebar_attributes_l10n.warning,r)):(r+=d.join("<br>"),n("alert",i,kopa_sidebar_attributes_l10n.error,r))}}):n("confirm",i,kopa_sidebar_attributes_l10n.info,o)}function n(a,i,t,o){var s=e("#kopa_modal_info"),n=s.find("#kopa_modal_confirm"),r=n.find("#kopa_confirm_ok"),_=n.find("#kopa_confirm_cancel");"confirm"!=a?n.hide():n.show(),s.find(".kopa_modal_info").empty().append(o),tb_show(t,"#TB_inline?width=450&height=420&inlineId=kopa_modal_info"),r.off("click",d).on("click",{allowDelete:!0,selector:i},d),_.off("click",d).on("click",{allowDelete:!1,selector:i},d)}function d(a){a.preventDefault();var i=a.data.allowDelete,t=a.data.selector;i&&t.parents(".kopa_sidebar").slideUp("fast",function(){e(this).remove()}),tb_remove()}function r(){var a=e(this);a.parent().siblings(".kopa_sidebar_before_widget, .kopa_sidebar_after_widget, .kopa_sidebar_before_title, .kopa_sidebar_after_title").slideToggle("fast")}e(".kopa_sidebar_sortable").sortable({handle:".kopa_sidebar_header"}),e(".kopa_sidebar_add_field").on("keyup",a),e(".kopa_sidebar_add_button").on("click",o),e(".kopa_sidebar_header").on("click",i),e(".kopa_sidebar_close_button").on("click",t),e(".kopa_sidebar_delete_button").on("click",s),e(".kopa_sidebar_advanced_settings").on("click",r)});
  • kopatheme/trunk/assets/js/admin.min.js

    r1353276 r1471418  
    1 /**
    2  * Kopa Framework Admin JS
    3  * Author: Kopatheme
    4  * Copyright: 2014 Kopatheme
    5  * License: GPLv2 or later
    6  */
    7 jQuery(document).ready(function(a){function b(){a(".kopa_tab_pane").hide();var b="";"undefined"!=typeof localStorage&&(b=localStorage.getItem("kopa_active_tab")),""!=b&&a(b).length?(a(b+"_tab").addClass("kopa_nav_active"),a(b).show()):(a(".kopa_nav_tabs li").first().addClass("kopa_nav_active"),a(".kopa_tab_pane").first().show()),a(".kopa_nav_tabs li a").on("click",function(a){a.preventDefault()}),a(".kopa_nav_tabs li").on("click",function(){var b=a(this),c=b.children(".kopa_nav_title"),d=a(c.attr("href"));"undefined"!=typeof localStorage&&localStorage.setItem("kopa_active_tab",c.attr("href")),b.addClass("kopa_nav_active").siblings().removeClass("kopa_nav_active"),d.show().siblings().hide()})}function f(b,f){var h=a("#"+f).val(),i="kopa_style_link_"+f,j=f+"_preview",k=f+"_style",n="kopa_typeface_"+a("#"+f).parents(".kopa_section").attr("id"),o=void 0,p=!1,q=!1,r=!1;if(kopa_system_fonts.indexOf(h)>=0?p=!0:kopa_google_font_families.indexOf(h)>=0?q=!0:e.indexOf(h)>=0&&(r=!0),r){var s=h,t="",u=e.indexOf(h),v=d[u],w=v.woff,x=v.ttf,y=v.svg,z=v.eot,A="";return a("#"+k).attr("disabled","disabled"),a("#"+j).fadeIn(),A+='<style class="'+n+'">'+"\n",A+="@font-face {\n",A+='font-family: "'+s+'";'+"\n",A+="src: ",z&&(A+='url("'+z+'");'+"\n",A+='src: url("'+z+'?#iefix") format("embedded-opentype")'),w&&z?A+=',\nurl("'+w+'") format("woff")':w&&(A+='url("'+w+'") format("woff")'),x&&(w||z)?A+=',\nurl("'+x+'") format("truetype")':x&&(A+='url("'+x+'") format("truetype")'),y?a.get(y,function(b){t=a(b).find("font").attr("id"),A+=x||w||z?',\nurl("'+y+"#"+t+'") format("svg")':'url("'+y+"#"+t+'") format("svg")',A+=";\n",A+="}\n",A+="</style>\n",a("."+n).remove(),a("head").append(A),a("#"+j).css("font-family",'"'+s+'"').css("font-style","").css("font-weight","")}):(A+=";\n",A+="}\n",A+="</style>\n",a("."+n).remove(),a("head").append(A),a("#"+j).css("font-family",'"'+s+'"').css("font-style","").css("font-weight","")),void 0}if(a("#"+k).removeAttr("disabled"),a(b).attr("id")===f&&q){var u=kopa_google_font_families.indexOf(h);u>=0&&(o=kopa_google_fonts[u],o.category&&(c=o.category))}if(h)if(a("#"+j).fadeIn(),"none"!==h&&"Select a font"!==h)if(p){var B=a("#"+k).val();if(a(b).attr("id")===f){a("#"+k+" option").remove();var C=["regular","italic","bold","bolditalic"],D="";for(var u in C)D=g(C[u]),D&&a("#"+k).append('<option value="'+C[u]+'">'+D+"</option>");B&&C.indexOf(B)>=0?a("#"+k).val(B).find('option[value="'+B+'"]').attr("selected","selected"):C.indexOf("regular")>=0?(B="regular",a("#"+k).val("regular").find('option[value="regular"]').attr("selected","selected")):(B=C[0],a("#"+k).val(B).find("option:first").attr("selected","selected"))}"regular"===B&&(B="normal"),a("#"+j).css("font-family",h),a("#"+j).css("font-weight",B.replace("italic","")),B.indexOf("italic")>=0?a("#"+j).css("font-style","italic"):a("#"+j).css("font-style","normal")}else{a("."+i).remove();var E=h.replace(/\s+/g,"+"),B=a("#"+k).val();if(void 0!==o){a("#"+k+" option").remove();var C=o.variants,D="";for(var u in C)D=g(C[u]),D&&a("#"+k).append('<option value="'+C[u]+'">'+D+"</option>");B&&C.indexOf(B)>=0?a("#"+k).val(B).find('option[value="'+B+'"]').attr("selected","selected"):C.indexOf("regular")>=0?(B="regular",a("#"+k).val("regular").find('option[value="regular"]').attr("selected","selected")):(B=C[0],a("#"+k).val(B).find("option:first").attr("selected","selected"))}"regular"===B&&(B="400"),a("head").append('<link href="http://fonts.googleapis.com/css?family='+E+":"+B+'" rel="stylesheet" type="text/css" class="'+i+'">'),a("#"+j).css("font-family",h+","+c),a("#"+j).css("font-weight",B.replace("italic","")),B.indexOf("italic")>=0?a("#"+j).css("font-style","italic"):a("#"+j).css("font-style","normal")}else a("#"+j).css("font-family",""),a("#"+j).fadeOut()}function g(a){var b={};for(var c in kopa_font_styles)if(b=kopa_font_styles[c],b.style===a)return b.label;return!1}function h(a,b){var c=jQuery(a),d=c.val(),e=b+"_preview";jQuery("#"+e).css("font-size",d+"px")}function i(){var a=jQuery(this),b=a.data("main-id");if(void 0!==b){var c=a.val()?a.val():a.data("default-color"),d=b+"_preview";c?jQuery("#"+d).css("color",c):jQuery("#"+d).css("color","inherit")}}function j(){var c=a(this),d=c.parents(".kopa_controls"),e=d.find(".kopa_custom_font_list"),g=(d.find(".kopa_custom_font_item"),c.data("name")),h=c.data("orders").toString(),i=[];itemCount=0,newItem="",""!==h&&(i=h.split(","),i=a.map(i,function(a){return parseInt(a)})),i.length&&(itemCount=Math.max.apply(null,i),itemCount+=1),i.push(itemCount),h=i.join(","),c.data("orders",h),i=e.find(".kopa_custom_font_order").map(function(){var a=this.value;return a=a.replace(/\D/g,""),a=parseFloat(a)}).get(),newItem+='<div class="kopa_custom_font_item">',newItem+='<div class="kopa_custom_font_top">',newItem+='<div class="kopa_custom_font_title_action">',newItem+="</div>",newItem+='<div class="kopa_custom_font_title">',newItem+="<strong>Custom Font "+(itemCount+1)+"</strong>",newItem+="</div>",newItem+="</div>",newItem+='<div class="kopa_custom_font_inside kopa_hide">';for(var j in kopa_custom_font_attributes){var n=kopa_custom_font_attributes[j],o="kopa_custom_font_item_"+j,p=!1,q="",r="";"name"===j&&n.value&&(r=n.value+" "+(itemCount+1)),"upload"===n.type&&(o+=" kopa_upload"),n.required&&(p=!0),n.mimes&&(q=n.mimes),newItem+='<div class="kopa_section"><div class="kopa_controls">',newItem+='<input class="'+o+'" type="text" name="'+g+"["+itemCount+"]["+j+']" placeholder="'+n.placeholder+'" '+(p?"required ":"")+'data-type="'+q+'" value="'+r+'">',"upload"===n.type&&(newItem+='<input class="kopa_upload_button kopa_button button" type="button" value="'+kopa_admin_l10n.upload+'">'),newItem+="</div></div>"}newItem+='<div class="kopa_custom_font_control_actions">',newItem+='<a class="kopa_custom_font_remove" href="#">'+kopa_sidebar_attributes_l10n.remove+"</a>",newItem+=" | ",newItem+='<a class="kopa_custom_font_close" href="#">'+kopa_sidebar_attributes_l10n.close+"</a>",newItem+="</div>",newItem+="</div>",newItem+="</div>",e.append(newItem);var s=e.children(".kopa_custom_font_item:last"),t=s.find(".kopa_custom_font_title_action");t.addClass("kopa_action_close"),s.children(".kopa_custom_font_inside").slideDown("fast"),s.on("click",".kopa_custom_font_top",k),s.on("click",".kopa_custom_font_close",l),s.on("click",".kopa_custom_font_remove",m)}function k(){var c=a(this),d=c.find(".kopa_custom_font_title_action"),e=c.siblings(".kopa_custom_font_inside");d.hasClass("kopa_action_close")?d.removeClass("kopa_action_close"):d.addClass("kopa_action_close"),e.slideToggle("fast")}function l(b){b.preventDefault();var c=a(this),d=c.parents(".kopa_custom_font_inside"),e=d.siblings(".kopa_custom_font_top"),f=e.find(".kopa_custom_font_title_action");f.removeClass("kopa_action_close"),d.slideUp("fast")}function m(b){b.preventDefault();var c=a(this),d=c.parents(".kopa_custom_font_item");confirm(kopa_admin_l10n.confirm_delete)&&d.slideUp("fast",function(){d.remove()})}Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=+b||0;if(1/0===Math.abs(f)&&(f=0),f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);e>c;){if(c in d&&d[c]===a)return c;c++}return-1}),jQuery(".kopa_fold").click(function(){var b=".kopa_fold_"+this.id;a(b).slideToggle("fast")}),setTimeout(function(){a(".kopa_message.updated.fade, .kopa_message.error.fade").fadeOut("slow")},3e3),a(".kopa_color").wpColorPicker(),a(".kopa_nav_title").length>0&&b(),a("#kopa_options_wrap .kopa_sidebar_menu_mobile_icon").on("click",function(){a("#kopa_options_wrap ul.kopa_nav_tabs").toggle()}),a(window).resize(function(){a(this).width()>980&&a("#kopa_options_wrap ul.kopa_nav_tabs").show().removeAttr("style")});var c="sans-serif",d=[],e=[];jQuery(".kopa_custom_font_item").each(function(){var a=jQuery(this),b=a.find(".kopa_custom_font_item_name").val(),c=a.find(".kopa_custom_font_item_woff").val(),f=a.find(".kopa_custom_font_item_ttf").val(),g=a.find(".kopa_custom_font_item_svg").val(),h=a.find(".kopa_custom_font_item_eot").val();d.push({woff:c,ttf:f,svg:g,eot:h}),e.push(b)}),jQuery(".kopa_select_font, .kopa_select_font_style").each(function(){var a=jQuery(this).data("main-id");f(this,a)}),jQuery(".kopa_select_font, .kopa_select_font_style").change(function(){var a=jQuery(this).data("main-id");f(this,a)}),jQuery(".kopa_select_font_size").each(function(){var a=jQuery(this).data("main-id");h(this,a)}),jQuery(".kopa_select_font_size").on("keyup change",function(){var a=jQuery(this).data("main-id");h(this,a)}),jQuery(".kopa_select_font_color").wpColorPicker({change:i,clear:i,palettes:!1}),jQuery(".kopa_select_font_color").each(i),a(".kopa_custom_font_list").sortable({items:".kopa_custom_font_item",handle:".kopa_custom_font_top"}),a(".kopa_add_font_button").on("click",j),a(".kopa_custom_font_top").on("click",k),a(".kopa_custom_font_close").on("click",l),a(".kopa_custom_font_remove").on("click",m),a(".kopa_reset").on("click",function(){return confirm(kopa_admin_l10n.confirm_reset)}),a(".kopa_import").on("click",function(){return confirm(kopa_admin_l10n.confirm_import)})});
     1jQuery(document).ready(function(t){function e(){t(".kopa_tab_pane").hide();var e="";"undefined"!=typeof localStorage&&(e=localStorage.getItem("kopa_active_tab")),""!=e&&t(e).length?(t(e+"_tab").addClass("kopa_nav_active"),t(e).show()):(t(".kopa_nav_tabs li").first().addClass("kopa_nav_active"),t(".kopa_tab_pane").first().show()),t(".kopa_nav_tabs li a").on("click",function(t){t.preventDefault()}),t(".kopa_nav_tabs li").on("click",function(){var e=t(this),o=e.children(".kopa_nav_title"),a=t(o.attr("href"));"undefined"!=typeof localStorage&&localStorage.setItem("kopa_active_tab",o.attr("href")),e.addClass("kopa_nav_active").siblings().removeClass("kopa_nav_active"),a.show().siblings().hide()})}function o(e,o){var n=t("#"+o).val(),i="kopa_style_link_"+o,s=o+"_preview",l=o+"_style",r="kopa_typeface_"+t("#"+o).parents(".kopa_section").attr("id"),_=void 0,u=!1,d=!1,m=!1;if(kopa_system_fonts.indexOf(n)>=0?u=!0:kopa_google_font_families.indexOf(n)>=0?d=!0:p.indexOf(n)>=0&&(m=!0),m){var v=n,k="",h=p.indexOf(n),y=f[h],g=y.woff,w=y.ttf,b=y.svg,I=y.eot,j="";return t("#"+l).attr("disabled","disabled"),t("#"+s).fadeIn(),j+='<style class="'+r+'">\n',j+="@font-face {\n",j+='font-family: "'+v+'";\n',j+="src: ",I&&(j+='url("'+I+'");\n',j+='src: url("'+I+'?#iefix") format("embedded-opentype")'),g&&I?j+=',\nurl("'+g+'") format("woff")':g&&(j+='url("'+g+'") format("woff")'),w&&(g||I)?j+=',\nurl("'+w+'") format("truetype")':w&&(j+='url("'+w+'") format("truetype")'),b?t.get(b,function(e){k=t(e).find("font").attr("id"),j+=w||g||I?',\nurl("'+b+"#"+k+'") format("svg")':'url("'+b+"#"+k+'") format("svg")',j+=";\n",j+="}\n",j+="</style>\n",t("."+r).remove(),t("head").append(j),t("#"+s).css("font-family",'"'+v+'"').css("font-style","").css("font-weight","")}):(j+=";\n",j+="}\n",j+="</style>\n",t("."+r).remove(),t("head").append(j),t("#"+s).css("font-family",'"'+v+'"').css("font-style","").css("font-weight","")),void 0}if(t("#"+l).removeAttr("disabled"),t(e).attr("id")===o&&d){var h=kopa_google_font_families.indexOf(n);h>=0&&(_=kopa_google_fonts[h],_.category&&(c=_.category))}if(n)if(t("#"+s).fadeIn(),"none"!==n&&"Select a font"!==n)if(u){var x=t("#"+l).val();if(t(e).attr("id")===o){t("#"+l+" option").remove();var C=["regular","italic","bold","bolditalic"],Q="";for(var h in C)Q=a(C[h]),Q&&t("#"+l).append('<option value="'+C[h]+'">'+Q+"</option>");x&&C.indexOf(x)>=0?t("#"+l).val(x).find('option[value="'+x+'"]').attr("selected","selected"):C.indexOf("regular")>=0?(x="regular",t("#"+l).val("regular").find('option[value="regular"]').attr("selected","selected")):(x=C[0],t("#"+l).val(x).find("option:first").attr("selected","selected"))}"regular"===x&&(x="normal"),t("#"+s).css("font-family",n),t("#"+s).css("font-weight",x.replace("italic","")),x.indexOf("italic")>=0?t("#"+s).css("font-style","italic"):t("#"+s).css("font-style","normal")}else{t("."+i).remove();var O=n.replace(/\s+/g,"+"),x=t("#"+l).val();if(void 0!==_){t("#"+l+" option").remove();var C=_.variants,Q="";for(var h in C)Q=a(C[h]),Q&&t("#"+l).append('<option value="'+C[h]+'">'+Q+"</option>");x&&C.indexOf(x)>=0?t("#"+l).val(x).find('option[value="'+x+'"]').attr("selected","selected"):C.indexOf("regular")>=0?(x="regular",t("#"+l).val("regular").find('option[value="regular"]').attr("selected","selected")):(x=C[0],t("#"+l).val(x).find("option:first").attr("selected","selected"))}"regular"===x&&(x="400"),t("head").append('<link href="http://fonts.googleapis.com/css?family='+O+":"+x+'" rel="stylesheet" type="text/css" class="'+i+'">'),t("#"+s).css("font-family",n+","+c),t("#"+s).css("font-weight",x.replace("italic","")),x.indexOf("italic")>=0?t("#"+s).css("font-style","italic"):t("#"+s).css("font-style","normal")}else t("#"+s).css("font-family",""),t("#"+s).fadeOut()}function a(t){var e={};for(var o in kopa_font_styles)if(e=kopa_font_styles[o],e.style===t)return e.label;return!1}function n(t,e){var o=jQuery(t),a=o.val(),n=e+"_preview";jQuery("#"+n).css("font-size",a+"px")}function i(){var t=jQuery(this),e=t.data("main-id");if(void 0!==e){var o=t.val()?t.val():t.data("default-color"),a=e+"_preview";o?jQuery("#"+a).css("color",o):jQuery("#"+a).css("color","inherit")}}function s(){var e=t(this),o=e.parents(".kopa_controls"),a=o.find(".kopa_custom_font_list"),n=(o.find(".kopa_custom_font_item"),e.data("name")),i=e.data("orders").toString(),s=[];itemCount=0,newItem="",""!==i&&(s=i.split(","),s=t.map(s,function(t){return parseInt(t)})),s.length&&(itemCount=Math.max.apply(null,s),itemCount+=1),s.push(itemCount),i=s.join(","),e.data("orders",i),s=a.find(".kopa_custom_font_order").map(function(){var t=this.value;return t=t.replace(/\D/g,""),t=parseFloat(t)}).get(),newItem+='<div class="kopa_custom_font_item">',newItem+='<div class="kopa_custom_font_top">',newItem+='<div class="kopa_custom_font_title_action">',newItem+="</div>",newItem+='<div class="kopa_custom_font_title">',newItem+="<strong>Custom Font "+(itemCount+1)+"</strong>",newItem+="</div>",newItem+="</div>",newItem+='<div class="kopa_custom_font_inside kopa_hide">';for(var c in kopa_custom_font_attributes){var f=kopa_custom_font_attributes[c],p="kopa_custom_font_item_"+c,u=!1,d="",m="";"name"===c&&f.value&&(m=f.value+" "+(itemCount+1)),"upload"===f.type&&(p+=" kopa_upload"),f.required&&(u=!0),f.mimes&&(d=f.mimes),newItem+='<div class="kopa_section"><div class="kopa_controls">',newItem+='<input class="'+p+'" type="text" name="'+n+"["+itemCount+"]["+c+']" placeholder="'+f.placeholder+'" '+(u?"required ":"")+'data-type="'+d+'" value="'+m+'">',"upload"===f.type&&(newItem+='<input class="kopa_upload_button kopa_button button" type="button" value="'+kopa_admin_l10n.upload+'">'),newItem+="</div></div>"}newItem+='<div class="kopa_custom_font_control_actions">',newItem+='<a class="kopa_custom_font_remove" href="#">'+kopa_sidebar_attributes_l10n.remove+"</a>",newItem+=" | ",newItem+='<a class="kopa_custom_font_close" href="#">'+kopa_sidebar_attributes_l10n.close+"</a>",newItem+="</div>",newItem+="</div>",newItem+="</div>",a.append(newItem);var v=a.children(".kopa_custom_font_item:last"),k=v.find(".kopa_custom_font_title_action");k.addClass("kopa_action_close"),v.children(".kopa_custom_font_inside").slideDown("fast"),v.on("click",".kopa_custom_font_top",l),v.on("click",".kopa_custom_font_close",r),v.on("click",".kopa_custom_font_remove",_)}function l(){var e=t(this),o=e.find(".kopa_custom_font_title_action"),a=e.siblings(".kopa_custom_font_inside");o.hasClass("kopa_action_close")?o.removeClass("kopa_action_close"):o.addClass("kopa_action_close"),a.slideToggle("fast")}function r(e){e.preventDefault();var o=t(this),a=o.parents(".kopa_custom_font_inside"),n=a.siblings(".kopa_custom_font_top"),i=n.find(".kopa_custom_font_title_action");i.removeClass("kopa_action_close"),a.slideUp("fast")}function _(e){e.preventDefault();var o=t(this),a=o.parents(".kopa_custom_font_item");confirm(kopa_admin_l10n.confirm_delete)&&a.slideUp("fast",function(){a.remove()})}Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var o;if(null==this)throw new TypeError('"this" is null or not defined');var a=Object(this),n=a.length>>>0;if(0===n)return-1;var i=+e||0;if(1/0===Math.abs(i)&&(i=0),i>=n)return-1;for(o=Math.max(i>=0?i:n-Math.abs(i),0);n>o;){if(o in a&&a[o]===t)return o;o++}return-1}),jQuery(".kopa_fold").click(function(){var e=".kopa_fold_"+this.id;t(e).slideToggle("fast")}),setTimeout(function(){t(".kopa_message.updated.fade, .kopa_message.error.fade").fadeOut("slow")},3e3),t(".kopa_color").wpColorPicker(),t(".kopa_nav_title").length>0&&e(),t("#kopa_options_wrap .kopa_sidebar_menu_mobile_icon").on("click",function(){t("#kopa_options_wrap ul.kopa_nav_tabs").toggle()}),t(window).resize(function(){t(this).width()>980&&t("#kopa_options_wrap ul.kopa_nav_tabs").show().removeAttr("style")});var c="sans-serif",f=[],p=[];jQuery(".kopa_custom_font_item").each(function(){var t=jQuery(this),e=t.find(".kopa_custom_font_item_name").val(),o=t.find(".kopa_custom_font_item_woff").val(),a=t.find(".kopa_custom_font_item_ttf").val(),n=t.find(".kopa_custom_font_item_svg").val(),i=t.find(".kopa_custom_font_item_eot").val();f.push({woff:o,ttf:a,svg:n,eot:i}),p.push(e)}),jQuery(".kopa_select_font, .kopa_select_font_style").each(function(){var t=jQuery(this).data("main-id");o(this,t)}),jQuery(".kopa_select_font, .kopa_select_font_style").change(function(){var t=jQuery(this).data("main-id");o(this,t)}),jQuery(".kopa_select_font_size").each(function(){var t=jQuery(this).data("main-id");n(this,t)}),jQuery(".kopa_select_font_size").on("keyup change",function(){var t=jQuery(this).data("main-id");n(this,t)}),jQuery(".kopa_select_font_color").wpColorPicker({change:i,clear:i,palettes:!1}),jQuery(".kopa_select_font_color").each(i),t(".kopa_custom_font_list").sortable({items:".kopa_custom_font_item",handle:".kopa_custom_font_top"}),t(".kopa_add_font_button").on("click",s),t(".kopa_custom_font_top").on("click",l),t(".kopa_custom_font_close").on("click",r),t(".kopa_custom_font_remove").on("click",_),t(".kopa_reset").on("click",function(){return confirm(kopa_admin_l10n.confirm_reset)}),t(".kopa_import").on("click",function(){return confirm(kopa_admin_l10n.confirm_import)})});
  • kopatheme/trunk/assets/js/custom-layout.min.js

    r1353276 r1471418  
    1 /**
    2  * Kopa Framework Custom Layout
    3  * Author: Kopatheme
    4  * Copyright: 2014 Kopatheme
    5  * License: GPLv2 or later
    6  */
    7 jQuery(document).ready(function(a){function b(){this.checked?a(".kopa_section_group_layout").find("select").removeAttr("disabled"):a(".kopa_section_group_layout").find("select").attr("disabled","disabled")}a(".kopa_use_custom_layout").each(b),a(".kopa_use_custom_layout").on("click",b)});
     1jQuery(document).ready(function(e){function o(){this.checked?e(".kopa_section_group_layout").find("select").removeAttr("disabled"):e(".kopa_section_group_layout").find("select").attr("disabled","disabled")}e(".kopa_use_custom_layout").each(o),e(".kopa_use_custom_layout").on("click",o)});
  • kopatheme/trunk/assets/js/jquery.datetimepicker.min.js

    r1353276 r1471418  
    1 /**
    2  * @preserve jQuery DateTimePicker plugin v2.4.1
    3  * @homepage http://xdsoft.net/jqplugins/datetimepicker/
    4  * (c) 2014, Chupurnov Valeriy.
    5  */
    6 /*global document,window,jQuery,setTimeout,clearTimeout*/
    7 (function ($) {
    8     'use strict';
    9     var default_options  = {
    10         i18n: {
    11             ar: { // Arabic
    12                 months: [
    13                     "كانون الثاني", "شباط", "آذار", "نيسان", "مايو", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"
    14                 ],
    15                 dayOfWeek: [
    16                     "ن", "ث", "ع", "خ", "ج", "س", "ح"
    17                 ]
    18             },
    19             ro: { // Romanian
    20                 months: [
    21                     "ianuarie", "februarie", "martie", "aprilie", "mai", "iunie", "iulie", "august", "septembrie", "octombrie", "noiembrie", "decembrie"
    22                 ],
    23                 dayOfWeek: [
    24                     "l", "ma", "mi", "j", "v", "s", "d"
    25                 ]
    26             },
    27             id: { // Indonesian
    28                 months: [
    29                     "Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"
    30                 ],
    31                 dayOfWeek: [
    32                     "Sen", "Sel", "Rab", "Kam", "Jum", "Sab", "Min"
    33                 ]
    34             },
    35             bg: { // Bulgarian
    36                 months: [
    37                     "Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"
    38                 ],
    39                 dayOfWeek: [
    40                     "Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
    41                 ]
    42             },
    43             fa: { // Persian/Farsi
    44                 months: [
    45                     'فروردین', 'اردیبهشت', 'خرداد', 'تیر', 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند'
    46                 ],
    47                 dayOfWeek: [
    48                     'یکشنبه', 'دوشنبه', 'سه شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'
    49                 ]
    50             },
    51             ru: { // Russian
    52                 months: [
    53                     'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'
    54                 ],
    55                 dayOfWeek: [
    56                     "Вск", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
    57                 ]
    58             },
    59             uk: { // Ukrainian
    60                 months: [
    61                     'Січень', 'Лютий', 'Березень', 'Квітень', 'Травень', 'Червень', 'Липень', 'Серпень', 'Вересень', 'Жовтень', 'Листопад', 'Грудень'
    62                 ],
    63                 dayOfWeek: [
    64                     "Ндл", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Сбт"
    65                 ]
    66             },
    67             en: { // English
    68                 months: [
    69                     "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
    70                 ],
    71                 dayOfWeek: [
    72                     "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
    73                 ]
    74             },
    75             el: { // Ελληνικά
    76                 months: [
    77                     "Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"
    78                 ],
    79                 dayOfWeek: [
    80                     "Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ"
    81                 ]
    82             },
    83             de: { // German
    84                 months: [
    85                     'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'
    86                 ],
    87                 dayOfWeek: [
    88                     "So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"
    89                 ]
    90             },
    91             nl: { // Dutch
    92                 months: [
    93                     "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"
    94                 ],
    95                 dayOfWeek: [
    96                     "zo", "ma", "di", "wo", "do", "vr", "za"
    97                 ]
    98             },
    99             tr: { // Turkish
    100                 months: [
    101                     "Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"
    102                 ],
    103                 dayOfWeek: [
    104                     "Paz", "Pts", "Sal", "Çar", "Per", "Cum", "Cts"
    105                 ]
    106             },
    107             fr: { //French
    108                 months: [
    109                     "Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"
    110                 ],
    111                 dayOfWeek: [
    112                     "Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"
    113                 ]
    114             },
    115             es: { // Spanish
    116                 months: [
    117                     "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"
    118                 ],
    119                 dayOfWeek: [
    120                     "Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"
    121                 ]
    122             },
    123             th: { // Thai
    124                 months: [
    125                     'มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'
    126                 ],
    127                 dayOfWeek: [
    128                     'อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'
    129                 ]
    130             },
    131             pl: { // Polish
    132                 months: [
    133                     "styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"
    134                 ],
    135                 dayOfWeek: [
    136                     "nd", "pn", "wt", "śr", "cz", "pt", "sb"
    137                 ]
    138             },
    139             pt: { // Portuguese
    140                 months: [
    141                     "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
    142                 ],
    143                 dayOfWeek: [
    144                     "Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"
    145                 ]
    146             },
    147             ch: { // Simplified Chinese
    148                 months: [
    149                     "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
    150                 ],
    151                 dayOfWeek: [
    152                     "日", "一", "二", "三", "四", "五", "六"
    153                 ]
    154             },
    155             se: { // Swedish
    156                 months: [
    157                     "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September",  "Oktober", "November", "December"
    158                 ],
    159                 dayOfWeek: [
    160                     "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"
    161                 ]
    162             },
    163             kr: { // Korean
    164                 months: [
    165                     "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
    166                 ],
    167                 dayOfWeek: [
    168                     "일", "월", "화", "수", "목", "금", "토"
    169                 ]
    170             },
    171             it: { // Italian
    172                 months: [
    173                     "Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"
    174                 ],
    175                 dayOfWeek: [
    176                     "Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"
    177                 ]
    178             },
    179             da: { // Dansk
    180                 months: [
    181                     "January", "Februar", "Marts", "April", "Maj", "Juni", "July", "August", "September", "Oktober", "November", "December"
    182                 ],
    183                 dayOfWeek: [
    184                     "Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"
    185                 ]
    186             },
    187             no: { // Norwegian
    188                 months: [
    189                     "Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"
    190                 ],
    191                 dayOfWeek: [
    192                     "Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"
    193                 ]
    194             },
    195             ja: { // Japanese
    196                 months: [
    197                     "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"
    198                 ],
    199                 dayOfWeek: [
    200                     "日", "月", "火", "水", "木", "金", "土"
    201                 ]
    202             },
    203             vi: { // Vietnamese
    204                 months: [
    205                     "Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"
    206                 ],
    207                 dayOfWeek: [
    208                     "CN", "T2", "T3", "T4", "T5", "T6", "T7"
    209                 ]
    210             },
    211             sl: { // Slovenščina
    212                 months: [
    213                     "Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"
    214                 ],
    215                 dayOfWeek: [
    216                     "Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"
    217                 ]
    218             },
    219             cs: { // Čeština
    220                 months: [
    221                     "Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"
    222                 ],
    223                 dayOfWeek: [
    224                     "Ne", "Po", "Út", "St", "Čt", "Pá", "So"
    225                 ]
    226             },
    227             hu: { // Hungarian
    228                 months: [
    229                     "Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"
    230                 ],
    231                 dayOfWeek: [
    232                     "Va", "Hé", "Ke", "Sze", "Cs", "Pé", "Szo"
    233                 ]
    234             },
    235             az: { //Azerbaijanian (Azeri)
    236                 months: [
    237                     "Yanvar", "Fevral", "Mart", "Aprel", "May", "Iyun", "Iyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr"
    238                 ],
    239                 dayOfWeek: [
    240                     "B", "Be", "Ça", "Ç", "Ca", "C", "Ş"
    241                 ]
    242             },
    243             bs: { //Bosanski
    244                 months: [
    245                     "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
    246                 ],
    247                 dayOfWeek: [
    248                     "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"
    249                 ]
    250             },
    251             ca: { //Català
    252                 months: [
    253                     "Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"
    254                 ],
    255                 dayOfWeek: [
    256                     "Dg", "Dl", "Dt", "Dc", "Dj", "Dv", "Ds"
    257                 ]
    258             },
    259             'en-GB': { //English (British)
    260                 months: [
    261                     "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
    262                 ],
    263                 dayOfWeek: [
    264                     "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
    265                 ]
    266             },
    267             et: { //"Eesti"
    268                 months: [
    269                     "Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"
    270                 ],
    271                 dayOfWeek: [
    272                     "P", "E", "T", "K", "N", "R", "L"
    273                 ]
    274             },
    275             eu: { //Euskara
    276                 months: [
    277                     "Urtarrila", "Otsaila", "Martxoa", "Apirila", "Maiatza", "Ekaina", "Uztaila", "Abuztua", "Iraila", "Urria", "Azaroa", "Abendua"
    278                 ],
    279                 dayOfWeek: [
    280                     "Ig.", "Al.", "Ar.", "Az.", "Og.", "Or.", "La."
    281                 ]
    282             },
    283             fi: { //Finnish (Suomi)
    284                 months: [
    285                     "Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"
    286                 ],
    287                 dayOfWeek: [
    288                     "Su", "Ma", "Ti", "Ke", "To", "Pe", "La"
    289                 ]
    290             },
    291             gl: { //Galego
    292                 months: [
    293                     "Xan", "Feb", "Maz", "Abr", "Mai", "Xun", "Xul", "Ago", "Set", "Out", "Nov", "Dec"
    294                 ],
    295                 dayOfWeek: [
    296                     "Dom", "Lun", "Mar", "Mer", "Xov", "Ven", "Sab"
    297                 ]
    298             },
    299             hr: { //Hrvatski
    300                 months: [
    301                     "Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"
    302                 ],
    303                 dayOfWeek: [
    304                     "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"
    305                 ]
    306             },
    307             ko: { //Korean (한국어)
    308                 months: [
    309                     "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
    310                 ],
    311                 dayOfWeek: [
    312                     "일", "월", "화", "수", "목", "금", "토"
    313                 ]
    314             },
    315             lt: { //Lithuanian (lietuvių)
    316                 months: [
    317                     "Sausio", "Vasario", "Kovo", "Balandžio", "Gegužės", "Birželio", "Liepos", "Rugpjūčio", "Rugsėjo", "Spalio", "Lapkričio", "Gruodžio"
    318                 ],
    319                 dayOfWeek: [
    320                     "Sek", "Pir", "Ant", "Tre", "Ket", "Pen", "Šeš"
    321                 ]
    322             },
    323             lv: { //Latvian (Latviešu)
    324                 months: [
    325                     "Janvāris", "Februāris", "Marts", "Aprīlis ", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"
    326                 ],
    327                 dayOfWeek: [
    328                     "Sv", "Pr", "Ot", "Tr", "Ct", "Pk", "St"
    329                 ]
    330             },
    331             mk: { //Macedonian (Македонски)
    332                 months: [
    333                     "јануари", "февруари", "март", "април", "мај", "јуни", "јули", "август", "септември", "октомври", "ноември", "декември"
    334                 ],
    335                 dayOfWeek: [
    336                     "нед", "пон", "вто", "сре", "чет", "пет", "саб"
    337                 ]
    338             },
    339             mn: { //Mongolian (Монгол)
    340                 months: [
    341                     "1-р сар", "2-р сар", "3-р сар", "4-р сар", "5-р сар", "6-р сар", "7-р сар", "8-р сар", "9-р сар", "10-р сар", "11-р сар", "12-р сар"
    342                 ],
    343                 dayOfWeek: [
    344                     "Дав", "Мяг", "Лха", "Пүр", "Бсн", "Бям", "Ням"
    345                 ]
    346             },
    347             'pt-BR': { //Português(Brasil)
    348                 months: [
    349                     "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
    350                 ],
    351                 dayOfWeek: [
    352                     "Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"
    353                 ]
    354             },
    355             sk: { //Slovenčina
    356                 months: [
    357                     "Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"
    358                 ],
    359                 dayOfWeek: [
    360                     "Ne", "Po", "Ut", "St", "Št", "Pi", "So"
    361                 ]
    362             },
    363             sq: { //Albanian (Shqip)
    364                 months: [
    365                     "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
    366                 ],
    367                 dayOfWeek: [
    368                     "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
    369                 ]
    370             },
    371             'sr-YU': { //Serbian (Srpski)
    372                 months: [
    373                     "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
    374                 ],
    375                 dayOfWeek: [
    376                     "Ned", "Pon", "Uto", "Sre", "čet", "Pet", "Sub"
    377                 ]
    378             },
    379             sr: { //Serbian Cyrillic (Српски)
    380                 months: [
    381                     "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"
    382                 ],
    383                 dayOfWeek: [
    384                     "нед", "пон", "уто", "сре", "чет", "пет", "суб"
    385                 ]
    386             },
    387             sv: { //Svenska
    388                 months: [
    389                     "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"
    390                 ],
    391                 dayOfWeek: [
    392                     "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"
    393                 ]
    394             },
    395             'zh-TW': { //Traditional Chinese (繁體中文)
    396                 months: [
    397                     "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
    398                 ],
    399                 dayOfWeek: [
    400                     "日", "一", "二", "三", "四", "五", "六"
    401                 ]
    402             },
    403             zh: { //Simplified Chinese (简体中文)
    404                 months: [
    405                     "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
    406                 ],
    407                 dayOfWeek: [
    408                     "日", "一", "二", "三", "四", "五", "六"
    409                 ]
    410             },
    411             he: { //Hebrew (עברית)
    412                 months: [
    413                     'ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר'
    414                 ],
    415                 dayOfWeek: [
    416                     'א\'', 'ב\'', 'ג\'', 'ד\'', 'ה\'', 'ו\'', 'שבת'
    417                 ]
    418             }
    419         },
    420         value: '',
    421         lang: 'en',
    422 
    423         format: 'Y/m/d H:i',
    424         formatTime: 'H:i',
    425         formatDate: 'Y/m/d',
    426 
    427         startDate:  false, // new Date(), '1986/12/08', '-1970/01/05','-1970/01/05',
    428         step: 60,
    429         monthChangeSpinner: true,
    430 
    431         closeOnDateSelect: false,
    432         closeOnWithoutClick: true,
    433         closeOnInputClick: true,
    434 
    435         timepicker: true,
    436         datepicker: true,
    437         weeks: false,
    438 
    439         defaultTime: false, // use formatTime format (ex. '10:00' for formatTime:   'H:i')
    440         defaultDate: false, // use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05')
    441 
    442         minDate: false,
    443         maxDate: false,
    444         minTime: false,
    445         maxTime: false,
    446 
    447         allowTimes: [],
    448         opened: false,
    449         initTime: true,
    450         inline: false,
    451         theme: '',
    452 
    453         onSelectDate: function () {},
    454         onSelectTime: function () {},
    455         onChangeMonth: function () {},
    456         onChangeYear: function () {},
    457         onChangeDateTime: function () {},
    458         onShow: function () {},
    459         onClose: function () {},
    460         onGenerate: function () {},
    461 
    462         withoutCopyright: true,
    463         inverseButton: false,
    464         hours12: false,
    465         next:   'xdsoft_next',
    466         prev : 'xdsoft_prev',
    467         dayOfWeekStart: 0,
    468         parentID: 'body',
    469         timeHeightInTimePicker: 25,
    470         timepickerScrollbar: true,
    471         todayButton: true,
    472         defaultSelect: true,
    473 
    474         scrollMonth: true,
    475         scrollTime: true,
    476         scrollInput: true,
    477 
    478         lazyInit: false,
    479         mask: false,
    480         validateOnBlur: true,
    481         allowBlank: true,
    482         yearStart: 1950,
    483         yearEnd: 2050,
    484         style: '',
    485         id: '',
    486         fixed: false,
    487         roundTime: 'round', // ceil, floor
    488         className: '',
    489         weekends: [],
    490         disabledDates : [],
    491         yearOffset: 0,
    492         beforeShowDay: null,
    493 
    494         enterLikeTab: true
    495     };
    496     // fix for ie8
    497     if (!Array.prototype.indexOf) {
    498         Array.prototype.indexOf = function (obj, start) {
    499             var i, j;
    500             for (i = (start || 0), j = this.length; i < j; i += 1) {
    501                 if (this[i] === obj) { return i; }
    502             }
    503             return -1;
    504         };
    505     }
    506     Date.prototype.countDaysInMonth = function () {
    507         return new Date(this.getFullYear(), this.getMonth() + 1, 0).getDate();
    508     };
    509     $.fn.xdsoftScroller = function (percent) {
    510         return this.each(function () {
    511             var timeboxparent = $(this),
    512                 pointerEventToXY = function (e) {
    513                     var out = {x: 0, y: 0},
    514                         touch;
    515                     if (e.type === 'touchstart' || e.type === 'touchmove' || e.type === 'touchend' || e.type === 'touchcancel') {
    516                         touch  = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
    517                         out.x = touch.clientX;
    518                         out.y = touch.clientY;
    519                     } else if (e.type === 'mousedown' || e.type === 'mouseup' || e.type === 'mousemove' || e.type === 'mouseover' || e.type === 'mouseout' || e.type === 'mouseenter' || e.type === 'mouseleave') {
    520                         out.x = e.clientX;
    521                         out.y = e.clientY;
    522                     }
    523                     return out;
    524                 },
    525                 move = 0,
    526                 timebox,
    527                 parentHeight,
    528                 height,
    529                 scrollbar,
    530                 scroller,
    531                 maximumOffset = 100,
    532                 start = false,
    533                 startY = 0,
    534                 startTop = 0,
    535                 h1 = 0,
    536                 touchStart = false,
    537                 startTopScroll = 0,
    538                 calcOffset = function () {};
    539             if (percent === 'hide') {
    540                 timeboxparent.find('.xdsoft_scrollbar').hide();
    541                 return;
    542             }
    543             if (!$(this).hasClass('xdsoft_scroller_box')) {
    544                 timebox = timeboxparent.children().eq(0);
    545                 parentHeight = timeboxparent[0].clientHeight;
    546                 height = timebox[0].offsetHeight;
    547                 scrollbar = $('<div class="xdsoft_scrollbar"></div>');
    548                 scroller = $('<div class="xdsoft_scroller"></div>');
    549                 scrollbar.append(scroller);
    550 
    551                 timeboxparent.addClass('xdsoft_scroller_box').append(scrollbar);
    552                 calcOffset = function calcOffset(event) {
    553                     var offset = pointerEventToXY(event).y - startY + startTopScroll;
    554                     if (offset < 0) {
    555                         offset = 0;
    556                     }
    557                     if (offset + scroller[0].offsetHeight > h1) {
    558                         offset = h1 - scroller[0].offsetHeight;
    559                     }
    560                     timeboxparent.trigger('scroll_element.xdsoft_scroller', [maximumOffset ? offset / maximumOffset : 0]);
    561                 };
    562 
    563                 scroller
    564                     .on('touchstart.xdsoft_scroller mousedown.xdsoft_scroller', function (event) {
    565                         if (!parentHeight) {
    566                             timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
    567                         }
    568 
    569                         startY = pointerEventToXY(event).y;
    570                         startTopScroll = parseInt(scroller.css('margin-top'), 10);
    571                         h1 = scrollbar[0].offsetHeight;
    572 
    573                         if (event.type === 'mousedown') {
    574                             if (document) {
    575                                 $(document.body).addClass('xdsoft_noselect');
    576                             }
    577                             $([document.body, window]).on('mouseup.xdsoft_scroller', function arguments_callee() {
    578                                 $([document.body, window]).off('mouseup.xdsoft_scroller', arguments_callee)
    579                                     .off('mousemove.xdsoft_scroller', calcOffset)
    580                                     .removeClass('xdsoft_noselect');
    581                             });
    582                             $(document.body).on('mousemove.xdsoft_scroller', calcOffset);
    583                         } else {
    584                             touchStart = true;
    585                             event.stopPropagation();
    586                             event.preventDefault();
    587                         }
    588                     })
    589                     .on('touchmove', function (event) {
    590                         if (touchStart) {
    591                             event.preventDefault();
    592                             calcOffset(event);
    593                         }
    594                     })
    595                     .on('touchend touchcancel', function (event) {
    596                         touchStart =  false;
    597                         startTopScroll = 0;
    598                     });
    599 
    600                 timeboxparent
    601                     .on('scroll_element.xdsoft_scroller', function (event, percentage) {
    602                         if (!parentHeight) {
    603                             timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percentage, true]);
    604                         }
    605                         percentage = percentage > 1 ? 1 : (percentage < 0 || isNaN(percentage)) ? 0 : percentage;
    606 
    607                         scroller.css('margin-top', maximumOffset * percentage);
    608 
    609                         setTimeout(function () {
    610                             timebox.css('marginTop', -parseInt((timebox[0].offsetHeight - parentHeight) * percentage, 10));
    611                         }, 10);
    612                     })
    613                     .on('resize_scroll.xdsoft_scroller', function (event, percentage, noTriggerScroll) {
    614                         var percent, sh;
    615                         parentHeight = timeboxparent[0].clientHeight;
    616                         height = timebox[0].offsetHeight;
    617                         percent = parentHeight / height;
    618                         sh = percent * scrollbar[0].offsetHeight;
    619                         if (percent > 1) {
    620                             scroller.hide();
    621                         } else {
    622                             scroller.show();
    623                             scroller.css('height', parseInt(sh > 10 ? sh : 10, 10));
    624                             maximumOffset = scrollbar[0].offsetHeight - scroller[0].offsetHeight;
    625                             if (noTriggerScroll !== true) {
    626                                 timeboxparent.trigger('scroll_element.xdsoft_scroller', [percentage || Math.abs(parseInt(timebox.css('marginTop'), 10)) / (height - parentHeight)]);
    627                             }
    628                         }
    629                     });
    630 
    631                 timeboxparent.on('mousewheel', function (event) {
    632                     var top = Math.abs(parseInt(timebox.css('marginTop'), 10));
    633 
    634                     top = top - (event.deltaY * 20);
    635                     if (top < 0) {
    636                         top = 0;
    637                     }
    638 
    639                     timeboxparent.trigger('scroll_element.xdsoft_scroller', [top / (height - parentHeight)]);
    640                     event.stopPropagation();
    641                     return false;
    642                 });
    643 
    644                 timeboxparent.on('touchstart', function (event) {
    645                     start = pointerEventToXY(event);
    646                     startTop = Math.abs(parseInt(timebox.css('marginTop'), 10));
    647                 });
    648 
    649                 timeboxparent.on('touchmove', function (event) {
    650                     if (start) {
    651                         event.preventDefault();
    652                         var coord = pointerEventToXY(event);
    653                         timeboxparent.trigger('scroll_element.xdsoft_scroller', [(startTop - (coord.y - start.y)) / (height - parentHeight)]);
    654                     }
    655                 });
    656 
    657                 timeboxparent.on('touchend touchcancel', function (event) {
    658                     start = false;
    659                     startTop = 0;
    660                 });
    661             }
    662             timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
    663         });
    664     };
    665 
    666     $.fn.datetimepicker = function (opt) {
    667         var KEY0 = 48,
    668             KEY9 = 57,
    669             _KEY0 = 96,
    670             _KEY9 = 105,
    671             CTRLKEY = 17,
    672             DEL = 46,
    673             ENTER = 13,
    674             ESC = 27,
    675             BACKSPACE = 8,
    676             ARROWLEFT = 37,
    677             ARROWUP = 38,
    678             ARROWRIGHT = 39,
    679             ARROWDOWN = 40,
    680             TAB = 9,
    681             F5 = 116,
    682             AKEY = 65,
    683             CKEY = 67,
    684             VKEY = 86,
    685             ZKEY = 90,
    686             YKEY = 89,
    687             ctrlDown    =   false,
    688             options = ($.isPlainObject(opt) || !opt) ? $.extend(true, {}, default_options, opt) : $.extend(true, {}, default_options),
    689 
    690             lazyInitTimer = 0,
    691             createDateTimePicker,
    692             destroyDateTimePicker,
    693             _xdsoft_datetime,
    694 
    695             lazyInit = function (input) {
    696                 input
    697                     .on('open.xdsoft focusin.xdsoft mousedown.xdsoft', function initOnActionCallback(event) {
    698                         if (input.is(':disabled') || input.is(':hidden') || !input.is(':visible') || input.data('xdsoft_datetimepicker')) {
    699                             return;
    700                         }
    701                         clearTimeout(lazyInitTimer);
    702                         lazyInitTimer = setTimeout(function () {
    703 
    704                             if (!input.data('xdsoft_datetimepicker')) {
    705                                 createDateTimePicker(input);
    706                             }
    707                             input
    708                                 .off('open.xdsoft focusin.xdsoft mousedown.xdsoft', initOnActionCallback)
    709                                 .trigger('open.xdsoft');
    710                         }, 100);
    711                     });
    712             };
    713 
    714         createDateTimePicker = function (input) {
    715             var datetimepicker = $('<div ' + (options.id ? 'id="' + options.id + '"' : '') + ' ' + (options.style ? 'style="' + options.style + '"' : '') + ' class="xdsoft_datetimepicker xdsoft_' + options.theme + ' xdsoft_noselect ' + (options.weeks ? ' xdsoft_showweeks' : '') + options.className + '"></div>'),
    716                 xdsoft_copyright = $('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),
    717                 datepicker = $('<div class="xdsoft_datepicker active"></div>'),
    718                 mounth_picker = $('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button>' +
    719                     '<div class="xdsoft_label xdsoft_month"><span></span><i></i></div>' +
    720                     '<div class="xdsoft_label xdsoft_year"><span></span><i></i></div>' +
    721                     '<button type="button" class="xdsoft_next"></button></div>'),
    722                 calendar = $('<div class="xdsoft_calendar"></div>'),
    723                 timepicker = $('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),
    724                 timeboxparent = timepicker.find('.xdsoft_time_box').eq(0),
    725                 timebox = $('<div class="xdsoft_time_variant"></div>'),
    726                 /*scrollbar = $('<div class="xdsoft_scrollbar"></div>'),
    727                 scroller = $('<div class="xdsoft_scroller"></div>'),*/
    728                 monthselect = $('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),
    729                 yearselect = $('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),
    730                 triggerAfterOpen = false,
    731                 XDSoft_datetime,
    732                 //scroll_element,
    733                 xchangeTimer,
    734                 timerclick,
    735                 current_time_index,
    736                 setPos,
    737                 timer = 0,
    738                 timer1 = 0;
    739 
    740             mounth_picker
    741                 .find('.xdsoft_month span')
    742                     .after(monthselect);
    743             mounth_picker
    744                 .find('.xdsoft_year span')
    745                     .after(yearselect);
    746 
    747             mounth_picker
    748                 .find('.xdsoft_month,.xdsoft_year')
    749                     .on('mousedown.xdsoft', function (event) {
    750                     var select = $(this).find('.xdsoft_select').eq(0),
    751                         val = 0,
    752                         top = 0,
    753                         visible = select.is(':visible'),
    754                         items,
    755                         i;
    756 
    757                     mounth_picker
    758                         .find('.xdsoft_select')
    759                             .hide();
    760                     if (_xdsoft_datetime.currentTime) {
    761                         val = _xdsoft_datetime.currentTime[$(this).hasClass('xdsoft_month') ? 'getMonth' : 'getFullYear']();
    762                     }
    763 
    764                     select[visible ? 'hide' : 'show']();
    765                     for (items = select.find('div.xdsoft_option'), i = 0; i < items.length; i += 1) {
    766                         if (items.eq(i).data('value') === val) {
    767                             break;
    768                         } else {
    769                             top += items[0].offsetHeight;
    770                         }
    771                     }
    772 
    773                     select.xdsoftScroller(top / (select.children()[0].offsetHeight - (select[0].clientHeight)));
    774                     event.stopPropagation();
    775                     return false;
    776                 });
    777 
    778             mounth_picker
    779                 .find('.xdsoft_select')
    780                     .xdsoftScroller()
    781                 .on('mousedown.xdsoft', function (event) {
    782                     event.stopPropagation();
    783                     event.preventDefault();
    784                 })
    785                 .on('mousedown.xdsoft', '.xdsoft_option', function (event) {
    786                     var year = _xdsoft_datetime.currentTime.getFullYear();
    787                     if (_xdsoft_datetime && _xdsoft_datetime.currentTime) {
    788                         _xdsoft_datetime.currentTime[$(this).parent().parent().hasClass('xdsoft_monthselect') ? 'setMonth' : 'setFullYear']($(this).data('value'));
    789                     }
    790 
    791                     $(this).parent().parent().hide();
    792 
    793                     datetimepicker.trigger('xchange.xdsoft');
    794                     if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
    795                         options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
    796                     }
    797 
    798                     if (year !== _xdsoft_datetime.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) {
    799                         options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
    800                     }
    801                 });
    802 
    803             datetimepicker.setOptions = function (_options) {
    804                 options = $.extend(true, {}, options, _options);
    805 
    806                 if (_options.allowTimes && $.isArray(_options.allowTimes) && _options.allowTimes.length) {
    807                     options.allowTimes = $.extend(true, [], _options.allowTimes);
    808                 }
    809 
    810                 if (_options.weekends && $.isArray(_options.weekends) && _options.weekends.length) {
    811                     options.weekends = $.extend(true, [], _options.weekends);
    812                 }
    813 
    814                 if (_options.disabledDates && $.isArray(_options.disabledDates) && _options.disabledDates.length) {
    815                     options.disabledDates = $.extend(true, [], _options.disabledDates);
    816                 }
    817 
    818                 if ((options.open || options.opened) && (!options.inline)) {
    819                     input.trigger('open.xdsoft');
    820                 }
    821 
    822                 if (options.inline) {
    823                     triggerAfterOpen = true;
    824                     datetimepicker.addClass('xdsoft_inline');
    825                     input.after(datetimepicker).hide();
    826                 }
    827 
    828                 if (options.inverseButton) {
    829                     options.next = 'xdsoft_prev';
    830                     options.prev = 'xdsoft_next';
    831                 }
    832 
    833                 if (options.datepicker) {
    834                     datepicker.addClass('active');
    835                 } else {
    836                     datepicker.removeClass('active');
    837                 }
    838 
    839                 if (options.timepicker) {
    840                     timepicker.addClass('active');
    841                 } else {
    842                     timepicker.removeClass('active');
    843                 }
    844 
    845                 if (options.value) {
    846                     if (input && input.val) {
    847                         input.val(options.value);
    848                     }
    849                     _xdsoft_datetime.setCurrentTime(options.value);
    850                 }
    851 
    852                 if (isNaN(options.dayOfWeekStart)) {
    853                     options.dayOfWeekStart = 0;
    854                 } else {
    855                     options.dayOfWeekStart = parseInt(options.dayOfWeekStart, 10) % 7;
    856                 }
    857 
    858                 if (!options.timepickerScrollbar) {
    859                     timeboxparent.xdsoftScroller('hide');
    860                 }
    861 
    862                 if (options.minDate && /^-(.*)$/.test(options.minDate)) {
    863                     options.minDate = _xdsoft_datetime.strToDateTime(options.minDate).dateFormat(options.formatDate);
    864                 }
    865 
    866                 if (options.maxDate &&  /^\+(.*)$/.test(options.maxDate)) {
    867                     options.maxDate = _xdsoft_datetime.strToDateTime(options.maxDate).dateFormat(options.formatDate);
    868                 }
    869 
    870                 mounth_picker
    871                     .find('.xdsoft_today_button')
    872                         .css('visibility', !options.todayButton ? 'hidden' : 'visible');
    873 
    874                 if (options.mask) {
    875                     var e,
    876                         getCaretPos = function (input) {
    877                             try {
    878                                 if (document.selection && document.selection.createRange) {
    879                                     var range = document.selection.createRange();
    880                                     return range.getBookmark().charCodeAt(2) - 2;
    881                                 }
    882                                 if (input.setSelectionRange) {
    883                                     return input.selectionStart;
    884                                 }
    885                             } catch (e) {
    886                                 return 0;
    887                             }
    888                         },
    889                         setCaretPos = function (node, pos) {
    890                             node = (typeof node === "string" || node instanceof String) ? document.getElementById(node) : node;
    891                             if (!node) {
    892                                 return false;
    893                             }
    894                             if (node.createTextRange) {
    895                                 var textRange = node.createTextRange();
    896                                 textRange.collapse(true);
    897                                 textRange.moveEnd('character', pos);
    898                                 textRange.moveStart('character', pos);
    899                                 textRange.select();
    900                                 return true;
    901                             }
    902                             if (node.setSelectionRange) {
    903                                 node.setSelectionRange(pos, pos);
    904                                 return true;
    905                             }
    906                             return false;
    907                         },
    908                         isValidValue = function (mask, value) {
    909                             var reg = mask
    910                                 .replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g, '\\$1')
    911                                 .replace(/_/g, '{digit+}')
    912                                 .replace(/([0-9]{1})/g, '{digit$1}')
    913                                 .replace(/\{digit([0-9]{1})\}/g, '[0-$1_]{1}')
    914                                 .replace(/\{digit[\+]\}/g, '[0-9_]{1}');
    915                             return (new RegExp(reg)).test(value);
    916                         };
    917                     input.off('keydown.xdsoft');
    918 
    919                     if (options.mask === true) {
    920                         options.mask = options.format
    921                             .replace(/Y/g, '9999')
    922                             .replace(/F/g, '9999')
    923                             .replace(/m/g, '19')
    924                             .replace(/d/g, '39')
    925                             .replace(/H/g, '29')
    926                             .replace(/i/g, '59')
    927                             .replace(/s/g, '59');
    928                     }
    929 
    930                     if ($.type(options.mask) === 'string') {
    931                         if (!isValidValue(options.mask, input.val())) {
    932                             input.val(options.mask.replace(/[0-9]/g, '_'));
    933                         }
    934 
    935                         input.on('keydown.xdsoft', function (event) {
    936                             var val = this.value,
    937                                 key = event.which,
    938                                 pos,
    939                                 digit;
    940 
    941                             if (((key >= KEY0 && key <= KEY9) || (key >= _KEY0 && key <= _KEY9)) || (key === BACKSPACE || key === DEL)) {
    942                                 pos = getCaretPos(this);
    943                                 digit = (key !== BACKSPACE && key !== DEL) ? String.fromCharCode((_KEY0 <= key && key <= _KEY9) ? key - KEY0 : key) : '_';
    944 
    945                                 if ((key === BACKSPACE || key === DEL) && pos) {
    946                                     pos -= 1;
    947                                     digit = '_';
    948                                 }
    949 
    950                                 while (/[^0-9_]/.test(options.mask.substr(pos, 1)) && pos < options.mask.length && pos > 0) {
    951                                     pos += (key === BACKSPACE || key === DEL) ? -1 : 1;
    952                                 }
    953 
    954                                 val = val.substr(0, pos) + digit + val.substr(pos + 1);
    955                                 if ($.trim(val) === '') {
    956                                     val = options.mask.replace(/[0-9]/g, '_');
    957                                 } else {
    958                                     if (pos === options.mask.length) {
    959                                         event.preventDefault();
    960                                         return false;
    961                                     }
    962                                 }
    963 
    964                                 pos += (key === BACKSPACE || key === DEL) ? 0 : 1;
    965                                 while (/[^0-9_]/.test(options.mask.substr(pos, 1)) && pos < options.mask.length && pos > 0) {
    966                                     pos += (key === BACKSPACE || key === DEL) ? -1 : 1;
    967                                 }
    968 
    969                                 if (isValidValue(options.mask, val)) {
    970                                     this.value = val;
    971                                     setCaretPos(this, pos);
    972                                 } else if ($.trim(val) === '') {
    973                                     this.value = options.mask.replace(/[0-9]/g, '_');
    974                                 } else {
    975                                     input.trigger('error_input.xdsoft');
    976                                 }
    977                             } else {
    978                                 if (([AKEY, CKEY, VKEY, ZKEY, YKEY].indexOf(key) !== -1 && ctrlDown) || [ESC, ARROWUP, ARROWDOWN, ARROWLEFT, ARROWRIGHT, F5, CTRLKEY, TAB, ENTER].indexOf(key) !== -1) {
    979                                     return true;
    980                                 }
    981                             }
    982 
    983                             event.preventDefault();
    984                             return false;
    985                         });
    986                     }
    987                 }
    988                 if (options.validateOnBlur) {
    989                     input
    990                         .off('blur.xdsoft')
    991                         .on('blur.xdsoft', function () {
    992                             if (options.allowBlank && !$.trim($(this).val()).length) {
    993                                 $(this).val(null);
    994                                 datetimepicker.data('xdsoft_datetime').empty();
    995                             } else if (!Date.parseDate($(this).val(), options.format)) {
    996                                 $(this).val((_xdsoft_datetime.now()).dateFormat(options.format));
    997                                 datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val());
    998                             } else {
    999                                 datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val());
    1000                             }
    1001                             datetimepicker.trigger('changedatetime.xdsoft');
    1002                         });
    1003                 }
    1004                 options.dayOfWeekStartPrev = (options.dayOfWeekStart === 0) ? 6 : options.dayOfWeekStart - 1;
    1005 
    1006                 datetimepicker
    1007                     .trigger('xchange.xdsoft')
    1008                     .trigger('afterOpen.xdsoft');
    1009             };
    1010 
    1011             datetimepicker
    1012                 .data('options', options)
    1013                 .on('mousedown.xdsoft', function (event) {
    1014                     event.stopPropagation();
    1015                     event.preventDefault();
    1016                     yearselect.hide();
    1017                     monthselect.hide();
    1018                     return false;
    1019                 });
    1020 
    1021             //scroll_element = timepicker.find('.xdsoft_time_box');
    1022             timeboxparent.append(timebox);
    1023             timeboxparent.xdsoftScroller();
    1024 
    1025             datetimepicker.on('afterOpen.xdsoft', function () {
    1026                 timeboxparent.xdsoftScroller();
    1027             });
    1028 
    1029             datetimepicker
    1030                 .append(datepicker)
    1031                 .append(timepicker);
    1032 
    1033             if (options.withoutCopyright !== true) {
    1034                 datetimepicker
    1035                     .append(xdsoft_copyright);
    1036             }
    1037 
    1038             datepicker
    1039                 .append(mounth_picker)
    1040                 .append(calendar);
    1041 
    1042             $(options.parentID)
    1043                 .append(datetimepicker);
    1044 
    1045             XDSoft_datetime = function () {
    1046                 var _this = this;
    1047                 _this.now = function (norecursion) {
    1048                     var d = new Date(),
    1049                         date,
    1050                         time;
    1051 
    1052                     if (!norecursion && options.defaultDate) {
    1053                         date = _this.strToDate(options.defaultDate);
    1054                         d.setFullYear(date.getFullYear());
    1055                         d.setMonth(date.getMonth());
    1056                         d.setDate(date.getDate());
    1057                     }
    1058 
    1059                     if (options.yearOffset) {
    1060                         d.setFullYear(d.getFullYear() + options.yearOffset);
    1061                     }
    1062 
    1063                     if (!norecursion && options.defaultTime) {
    1064                         time = _this.strtotime(options.defaultTime);
    1065                         d.setHours(time.getHours());
    1066                         d.setMinutes(time.getMinutes());
    1067                     }
    1068 
    1069                     return d;
    1070                 };
    1071 
    1072                 _this.isValidDate = function (d) {
    1073                     if (Object.prototype.toString.call(d) !== "[object Date]") {
    1074                         return false;
    1075                     }
    1076                     return !isNaN(d.getTime());
    1077                 };
    1078 
    1079                 _this.setCurrentTime = function (dTime) {
    1080                     _this.currentTime = (typeof dTime === 'string') ? _this.strToDateTime(dTime) : _this.isValidDate(dTime) ? dTime : _this.now();
    1081                     datetimepicker.trigger('xchange.xdsoft');
    1082                 };
    1083 
    1084                 _this.empty = function () {
    1085                     _this.currentTime = null;
    1086                 };
    1087 
    1088                 _this.getCurrentTime = function (dTime) {
    1089                     return _this.currentTime;
    1090                 };
    1091 
    1092                 _this.nextMonth = function () {
    1093                     var month = _this.currentTime.getMonth() + 1,
    1094                         year;
    1095                     if (month === 12) {
    1096                         _this.currentTime.setFullYear(_this.currentTime.getFullYear() + 1);
    1097                         month = 0;
    1098                     }
    1099 
    1100                     year = _this.currentTime.getFullYear();
    1101 
    1102                     _this.currentTime.setDate(
    1103                         Math.min(
    1104                             new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(),
    1105                             _this.currentTime.getDate()
    1106                         )
    1107                     );
    1108                     _this.currentTime.setMonth(month);
    1109 
    1110                     if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
    1111                         options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
    1112                     }
    1113 
    1114                     if (year !== _this.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) {
    1115                         options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
    1116                     }
    1117 
    1118                     datetimepicker.trigger('xchange.xdsoft');
    1119                     return month;
    1120                 };
    1121 
    1122                 _this.prevMonth = function () {
    1123                     var month = _this.currentTime.getMonth() - 1;
    1124                     if (month === -1) {
    1125                         _this.currentTime.setFullYear(_this.currentTime.getFullYear() - 1);
    1126                         month = 11;
    1127                     }
    1128                     _this.currentTime.setDate(
    1129                         Math.min(
    1130                             new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(),
    1131                             _this.currentTime.getDate()
    1132                         )
    1133                     );
    1134                     _this.currentTime.setMonth(month);
    1135                     if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
    1136                         options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
    1137                     }
    1138                     datetimepicker.trigger('xchange.xdsoft');
    1139                     return month;
    1140                 };
    1141 
    1142                 _this.getWeekOfYear = function (datetime) {
    1143                     var onejan = new Date(datetime.getFullYear(), 0, 1);
    1144                     return Math.ceil((((datetime - onejan) / 86400000) + onejan.getDay() + 1) / 7);
    1145                 };
    1146 
    1147                 _this.strToDateTime = function (sDateTime) {
    1148                     var tmpDate = [], timeOffset, currentTime;
    1149 
    1150                     if (sDateTime && sDateTime instanceof Date && _this.isValidDate(sDateTime)) {
    1151                         return sDateTime;
    1152                     }
    1153 
    1154                     tmpDate = /^(\+|\-)(.*)$/.exec(sDateTime);
    1155                     if (tmpDate) {
    1156                         tmpDate[2] = Date.parseDate(tmpDate[2], options.formatDate);
    1157                     }
    1158                     if (tmpDate  && tmpDate[2]) {
    1159                         timeOffset = tmpDate[2].getTime() - (tmpDate[2].getTimezoneOffset()) * 60000;
    1160                         currentTime = new Date((_xdsoft_datetime.now()).getTime() + parseInt(tmpDate[1] + '1', 10) * timeOffset);
    1161                     } else {
    1162                         currentTime = sDateTime ? Date.parseDate(sDateTime, options.format) : _this.now();
    1163                     }
    1164 
    1165                     if (!_this.isValidDate(currentTime)) {
    1166                         currentTime = _this.now();
    1167                     }
    1168 
    1169                     return currentTime;
    1170                 };
    1171 
    1172                 _this.strToDate = function (sDate) {
    1173                     if (sDate && sDate instanceof Date && _this.isValidDate(sDate)) {
    1174                         return sDate;
    1175                     }
    1176 
    1177                     var currentTime = sDate ? Date.parseDate(sDate, options.formatDate) : _this.now(true);
    1178                     if (!_this.isValidDate(currentTime)) {
    1179                         currentTime = _this.now(true);
    1180                     }
    1181                     return currentTime;
    1182                 };
    1183 
    1184                 _this.strtotime = function (sTime) {
    1185                     if (sTime && sTime instanceof Date && _this.isValidDate(sTime)) {
    1186                         return sTime;
    1187                     }
    1188                     var currentTime = sTime ? Date.parseDate(sTime, options.formatTime) : _this.now(true);
    1189                     if (!_this.isValidDate(currentTime)) {
    1190                         currentTime = _this.now(true);
    1191                     }
    1192                     return currentTime;
    1193                 };
    1194 
    1195                 _this.str = function () {
    1196                     return _this.currentTime.dateFormat(options.format);
    1197                 };
    1198                 _this.currentTime = this.now();
    1199             };
    1200 
    1201             _xdsoft_datetime = new XDSoft_datetime();
    1202 
    1203             mounth_picker
    1204                 .find('.xdsoft_today_button')
    1205                 .on('mousedown.xdsoft', function () {
    1206                     datetimepicker.data('changed', true);
    1207                     _xdsoft_datetime.setCurrentTime(0);
    1208                     datetimepicker.trigger('afterOpen.xdsoft');
    1209                 }).on('dblclick.xdsoft', function () {
    1210                     input.val(_xdsoft_datetime.str());
    1211                     datetimepicker.trigger('close.xdsoft');
    1212                 });
    1213             mounth_picker
    1214                 .find('.xdsoft_prev,.xdsoft_next')
    1215                 .on('mousedown.xdsoft', function () {
    1216                     var $this = $(this),
    1217                         timer = 0,
    1218                         stop = false;
    1219 
    1220                     (function arguments_callee1(v) {
    1221                         var month =  _xdsoft_datetime.currentTime.getMonth();
    1222                         if ($this.hasClass(options.next)) {
    1223                             _xdsoft_datetime.nextMonth();
    1224                         } else if ($this.hasClass(options.prev)) {
    1225                             _xdsoft_datetime.prevMonth();
    1226                         }
    1227                         if (options.monthChangeSpinner) {
    1228                             if (!stop) {
    1229                                 timer = setTimeout(arguments_callee1, v || 100);
    1230                             }
    1231                         }
    1232                     }(500));
    1233 
    1234                     $([document.body, window]).on('mouseup.xdsoft', function arguments_callee2() {
    1235                         clearTimeout(timer);
    1236                         stop = true;
    1237                         $([document.body, window]).off('mouseup.xdsoft', arguments_callee2);
    1238                     });
    1239                 });
    1240 
    1241             timepicker
    1242                 .find('.xdsoft_prev,.xdsoft_next')
    1243                 .on('mousedown.xdsoft', function () {
    1244                     var $this = $(this),
    1245                         timer = 0,
    1246                         stop = false,
    1247                         period = 110;
    1248                     (function arguments_callee4(v) {
    1249                         var pheight = timeboxparent[0].clientHeight,
    1250                             height = timebox[0].offsetHeight,
    1251                             top = Math.abs(parseInt(timebox.css('marginTop'), 10));
    1252                         if ($this.hasClass(options.next) && (height - pheight) - options.timeHeightInTimePicker >= top) {
    1253                             timebox.css('marginTop', '-' + (top + options.timeHeightInTimePicker) + 'px');
    1254                         } else if ($this.hasClass(options.prev) && top - options.timeHeightInTimePicker >= 0) {
    1255                             timebox.css('marginTop', '-' + (top - options.timeHeightInTimePicker) + 'px');
    1256                         }
    1257                         timeboxparent.trigger('scroll_element.xdsoft_scroller', [Math.abs(parseInt(timebox.css('marginTop'), 10) / (height - pheight))]);
    1258                         period = (period > 10) ? 10 : period - 10;
    1259                         if (!stop) {
    1260                             timer = setTimeout(arguments_callee4, v || period);
    1261                         }
    1262                     }(500));
    1263                     $([document.body, window]).on('mouseup.xdsoft', function arguments_callee5() {
    1264                         clearTimeout(timer);
    1265                         stop = true;
    1266                         $([document.body, window])
    1267                             .off('mouseup.xdsoft', arguments_callee5);
    1268                     });
    1269                 });
    1270 
    1271             xchangeTimer = 0;
    1272             // base handler - generating a calendar and timepicker
    1273             datetimepicker
    1274                 .on('xchange.xdsoft', function (event) {
    1275                     clearTimeout(xchangeTimer);
    1276                     xchangeTimer = setTimeout(function () {
    1277                         var table = '',
    1278                             start = new Date(_xdsoft_datetime.currentTime.getFullYear(), _xdsoft_datetime.currentTime.getMonth(), 1, 12, 0, 0),
    1279                             i = 0,
    1280                             j,
    1281                             today = _xdsoft_datetime.now(),
    1282                             maxDate = false,
    1283                             minDate = false,
    1284                             d,
    1285                             y,
    1286                             m,
    1287                             w,
    1288                             classes = [],
    1289                             customDateSettings,
    1290                             newRow = true,
    1291                             time = '',
    1292                             h = '',
    1293                             line_time;
    1294 
    1295                         while (start.getDay() !== options.dayOfWeekStart) {
    1296                             start.setDate(start.getDate() - 1);
    1297                         }
    1298 
    1299                         table += '<table><thead><tr>';
    1300 
    1301                         if (options.weeks) {
    1302                             table += '<th></th>';
    1303                         }
    1304 
    1305                         for (j = 0; j < 7; j += 1) {
    1306                             table += '<th>' + options.i18n[options.lang].dayOfWeek[(j + options.dayOfWeekStart) % 7] + '</th>';
    1307                         }
    1308 
    1309                         table += '</tr></thead>';
    1310                         table += '<tbody>';
    1311 
    1312                         if (options.maxDate !== false) {
    1313                             maxDate = _xdsoft_datetime.strToDate(options.maxDate);
    1314                             maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate(), 23, 59, 59, 999);
    1315                         }
    1316 
    1317                         if (options.minDate !== false) {
    1318                             minDate = _xdsoft_datetime.strToDate(options.minDate);
    1319                             minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate());
    1320                         }
    1321 
    1322                         while (i < _xdsoft_datetime.currentTime.countDaysInMonth() || start.getDay() !== options.dayOfWeekStart || _xdsoft_datetime.currentTime.getMonth() === start.getMonth()) {
    1323                             classes = [];
    1324                             i += 1;
    1325 
    1326                             d = start.getDate();
    1327                             y = start.getFullYear();
    1328                             m = start.getMonth();
    1329                             w = _xdsoft_datetime.getWeekOfYear(start);
    1330 
    1331                             classes.push('xdsoft_date');
    1332 
    1333                             if (options.beforeShowDay && $.isFunction(options.beforeShowDay.call)) {
    1334                                 customDateSettings = options.beforeShowDay.call(datetimepicker, start);
    1335                             } else {
    1336                                 customDateSettings = null;
    1337                             }
    1338 
    1339                             if ((maxDate !== false && start > maxDate) || (minDate !== false && start < minDate) || (customDateSettings && customDateSettings[0] === false)) {
    1340                                 classes.push('xdsoft_disabled');
    1341                             } else if (options.disabledDates.indexOf(start.dateFormat(options.formatDate)) !== -1) {
    1342                                 classes.push('xdsoft_disabled');
    1343                             }
    1344 
    1345                             if (customDateSettings && customDateSettings[1] !== "") {
    1346                                 classes.push(customDateSettings[1]);
    1347                             }
    1348 
    1349                             if (_xdsoft_datetime.currentTime.getMonth() !== m) {
    1350                                 classes.push('xdsoft_other_month');
    1351                             }
    1352 
    1353                             if ((options.defaultSelect || datetimepicker.data('changed')) && _xdsoft_datetime.currentTime.dateFormat(options.formatDate) === start.dateFormat(options.formatDate)) {
    1354                                 classes.push('xdsoft_current');
    1355                             }
    1356 
    1357                             if (today.dateFormat(options.formatDate) === start.dateFormat(options.formatDate)) {
    1358                                 classes.push('xdsoft_today');
    1359                             }
    1360 
    1361                             if (start.getDay() === 0 || start.getDay() === 6 || options.weekends.indexOf(start.dateFormat(options.formatDate)) === -1) {
    1362                                 classes.push('xdsoft_weekend');
    1363                             }
    1364 
    1365                             if (options.beforeShowDay && $.isFunction(options.beforeShowDay)) {
    1366                                 classes.push(options.beforeShowDay(start));
    1367                             }
    1368 
    1369                             if (newRow) {
    1370                                 table += '<tr>';
    1371                                 newRow = false;
    1372                                 if (options.weeks) {
    1373                                     table += '<th>' + w + '</th>';
    1374                                 }
    1375                             }
    1376 
    1377                             table += '<td data-date="' + d + '" data-month="' + m + '" data-year="' + y + '"' + ' class="xdsoft_date xdsoft_day_of_week' + start.getDay() + ' ' + classes.join(' ') + '">' +
    1378                                         '<div>' + d + '</div>' +
    1379                                     '</td>';
    1380 
    1381                             if (start.getDay() === options.dayOfWeekStartPrev) {
    1382                                 table += '</tr>';
    1383                                 newRow = true;
    1384                             }
    1385 
    1386                             start.setDate(d + 1);
    1387                         }
    1388                         table += '</tbody></table>';
    1389 
    1390                         calendar.html(table);
    1391 
    1392                         mounth_picker.find('.xdsoft_label span').eq(0).text(options.i18n[options.lang].months[_xdsoft_datetime.currentTime.getMonth()]);
    1393                         mounth_picker.find('.xdsoft_label span').eq(1).text(_xdsoft_datetime.currentTime.getFullYear());
    1394 
    1395                         // generate timebox
    1396                         time = '';
    1397                         h = '';
    1398                         m = '';
    1399                         line_time = function line_time(h, m) {
    1400                             var now = _xdsoft_datetime.now();
    1401                             now.setHours(h);
    1402                             h = parseInt(now.getHours(), 10);
    1403                             now.setMinutes(m);
    1404                             m = parseInt(now.getMinutes(), 10);
    1405 
    1406                             classes = [];
    1407                             if ((options.maxTime !== false && _xdsoft_datetime.strtotime(options.maxTime).getTime() < now.getTime()) || (options.minTime !== false && _xdsoft_datetime.strtotime(options.minTime).getTime() > now.getTime())) {
    1408                                 classes.push('xdsoft_disabled');
    1409                             }
    1410                             if ((options.initTime || options.defaultSelect || datetimepicker.data('changed')) && parseInt(_xdsoft_datetime.currentTime.getHours(), 10) === parseInt(h, 10) && (options.step > 59 || Math[options.roundTime](_xdsoft_datetime.currentTime.getMinutes() / options.step) * options.step === parseInt(m, 10))) {
    1411                                 if (options.defaultSelect || datetimepicker.data('changed')) {
    1412                                     classes.push('xdsoft_current');
    1413                                 } else if (options.initTime) {
    1414                                     classes.push('xdsoft_init_time');
    1415                                 }
    1416                             }
    1417                             if (parseInt(today.getHours(), 10) === parseInt(h, 10) && parseInt(today.getMinutes(), 10) === parseInt(m, 10)) {
    1418                                 classes.push('xdsoft_today');
    1419                             }
    1420                             time += '<div class="xdsoft_time ' + classes.join(' ') + '" data-hour="' + h + '" data-minute="' + m + '">' + now.dateFormat(options.formatTime) + '</div>';
    1421                         };
    1422 
    1423                         if (!options.allowTimes || !$.isArray(options.allowTimes) || !options.allowTimes.length) {
    1424                             for (i = 0, j = 0; i < (options.hours12 ? 12 : 24); i += 1) {
    1425                                 for (j = 0; j < 60; j += options.step) {
    1426                                     h = (i < 10 ? '0' : '') + i;
    1427                                     m = (j < 10 ? '0' : '') + j;
    1428                                     line_time(h, m);
    1429                                 }
    1430                             }
    1431                         } else {
    1432                             for (i = 0; i < options.allowTimes.length; i += 1) {
    1433                                 h = _xdsoft_datetime.strtotime(options.allowTimes[i]).getHours();
    1434                                 m = _xdsoft_datetime.strtotime(options.allowTimes[i]).getMinutes();
    1435                                 line_time(h, m);
    1436                             }
    1437                         }
    1438 
    1439                         timebox.html(time);
    1440 
    1441                         opt = '';
    1442                         i = 0;
    1443 
    1444                         for (i = parseInt(options.yearStart, 10) + options.yearOffset; i <= parseInt(options.yearEnd, 10) + options.yearOffset; i += 1) {
    1445                             opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getFullYear() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + i + '</div>';
    1446                         }
    1447                         yearselect.children().eq(0)
    1448                                                 .html(opt);
    1449 
    1450                         for (i = 0, opt = ''; i <= 11; i += 1) {
    1451                             opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getMonth() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + options.i18n[options.lang].months[i] + '</div>';
    1452                         }
    1453                         monthselect.children().eq(0).html(opt);
    1454                         $(datetimepicker)
    1455                             .trigger('generate.xdsoft');
    1456                     }, 10);
    1457                     event.stopPropagation();
    1458                 })
    1459                 .on('afterOpen.xdsoft', function () {
    1460                     if (options.timepicker) {
    1461                         var classType, pheight, height, top;
    1462                         if (timebox.find('.xdsoft_current').length) {
    1463                             classType = '.xdsoft_current';
    1464                         } else if (timebox.find('.xdsoft_init_time').length) {
    1465                             classType = '.xdsoft_init_time';
    1466                         }
    1467                         if (classType) {
    1468                             pheight = timeboxparent[0].clientHeight;
    1469                             height = timebox[0].offsetHeight;
    1470                             top = timebox.find(classType).index() * options.timeHeightInTimePicker + 1;
    1471                             if ((height - pheight) < top) {
    1472                                 top = height - pheight;
    1473                             }
    1474                             timeboxparent.trigger('scroll_element.xdsoft_scroller', [parseInt(top, 10) / (height - pheight)]);
    1475                         } else {
    1476                             timeboxparent.trigger('scroll_element.xdsoft_scroller', [0]);
    1477                         }
    1478                     }
    1479                 });
    1480 
    1481             timerclick = 0;
    1482             calendar
    1483                 .on('click.xdsoft', 'td', function (xdevent) {
    1484                     xdevent.stopPropagation();  // Prevents closing of Pop-ups, Modals and Flyouts in Bootstrap
    1485                     timerclick += 1;
    1486                     var $this = $(this),
    1487                         currentTime = _xdsoft_datetime.currentTime;
    1488 
    1489                     if (currentTime === undefined || currentTime === null) {
    1490                         _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
    1491                         currentTime = _xdsoft_datetime.currentTime;
    1492                     }
    1493 
    1494                     if ($this.hasClass('xdsoft_disabled')) {
    1495                         return false;
    1496                     }
    1497 
    1498                     currentTime.setDate(1);
    1499                     currentTime.setFullYear($this.data('year'));
    1500                     currentTime.setMonth($this.data('month'));
    1501                     currentTime.setDate($this.data('date'));
    1502 
    1503                     datetimepicker.trigger('select.xdsoft', [currentTime]);
    1504 
    1505                     input.val(_xdsoft_datetime.str());
    1506                     if ((timerclick > 1 || (options.closeOnDateSelect === true || (options.closeOnDateSelect === 0 && !options.timepicker))) && !options.inline) {
    1507                         datetimepicker.trigger('close.xdsoft');
    1508                     }
    1509 
    1510                     if (options.onSelectDate && $.isFunction(options.onSelectDate)) {
    1511                         options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
    1512                     }
    1513 
    1514                     datetimepicker.data('changed', true);
    1515                     datetimepicker.trigger('xchange.xdsoft');
    1516                     datetimepicker.trigger('changedatetime.xdsoft');
    1517                     setTimeout(function () {
    1518                         timerclick = 0;
    1519                     }, 200);
    1520                 });
    1521 
    1522             timebox
    1523                 .on('click.xdsoft', 'div', function (xdevent) {
    1524                     xdevent.stopPropagation();
    1525                     var $this = $(this),
    1526                         currentTime = _xdsoft_datetime.currentTime;
    1527 
    1528                     if (currentTime === undefined || currentTime === null) {
    1529                         _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
    1530                         currentTime = _xdsoft_datetime.currentTime;
    1531                     }
    1532 
    1533                     if ($this.hasClass('xdsoft_disabled')) {
    1534                         return false;
    1535                     }
    1536                     currentTime.setHours($this.data('hour'));
    1537                     currentTime.setMinutes($this.data('minute'));
    1538                     datetimepicker.trigger('select.xdsoft', [currentTime]);
    1539 
    1540                     datetimepicker.data('input').val(_xdsoft_datetime.str());
    1541                     if (!options.inline) {
    1542                         datetimepicker.trigger('close.xdsoft');
    1543                     }
    1544 
    1545                     if (options.onSelectTime && $.isFunction(options.onSelectTime)) {
    1546                         options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
    1547                     }
    1548                     datetimepicker.data('changed', true);
    1549                     datetimepicker.trigger('xchange.xdsoft');
    1550                     datetimepicker.trigger('changedatetime.xdsoft');
    1551                 });
    1552 
    1553 
    1554             datepicker
    1555                 .on('mousewheel.xdsoft', function (event) {
    1556                     if (!options.scrollMonth) {
    1557                         return true;
    1558                     }
    1559                     if (event.deltaY < 0) {
    1560                         _xdsoft_datetime.nextMonth();
    1561                     } else {
    1562                         _xdsoft_datetime.prevMonth();
    1563                     }
    1564                     return false;
    1565                 });
    1566 
    1567             input
    1568                 .on('mousewheel.xdsoft', function (event) {
    1569                     if (!options.scrollInput) {
    1570                         return true;
    1571                     }
    1572                     if (!options.datepicker && options.timepicker) {
    1573                         current_time_index = timebox.find('.xdsoft_current').length ? timebox.find('.xdsoft_current').eq(0).index() : 0;
    1574                         if (current_time_index + event.deltaY >= 0 && current_time_index + event.deltaY < timebox.children().length) {
    1575                             current_time_index += event.deltaY;
    1576                         }
    1577                         if (timebox.children().eq(current_time_index).length) {
    1578                             timebox.children().eq(current_time_index).trigger('mousedown');
    1579                         }
    1580                         return false;
    1581                     }
    1582                     if (options.datepicker && !options.timepicker) {
    1583                         datepicker.trigger(event, [event.deltaY, event.deltaX, event.deltaY]);
    1584                         if (input.val) {
    1585                             input.val(_xdsoft_datetime.str());
    1586                         }
    1587                         datetimepicker.trigger('changedatetime.xdsoft');
    1588                         return false;
    1589                     }
    1590                 });
    1591 
    1592             datetimepicker
    1593                 .on('changedatetime.xdsoft', function (event) {
    1594                     if (options.onChangeDateTime && $.isFunction(options.onChangeDateTime)) {
    1595                         var $input = datetimepicker.data('input');
    1596                         options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input, event);
    1597                         delete options.value;
    1598                         $input.trigger('change');
    1599                     }
    1600                 })
    1601                 .on('generate.xdsoft', function () {
    1602                     if (options.onGenerate && $.isFunction(options.onGenerate)) {
    1603                         options.onGenerate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
    1604                     }
    1605                     if (triggerAfterOpen) {
    1606                         datetimepicker.trigger('afterOpen.xdsoft');
    1607                         triggerAfterOpen = false;
    1608                     }
    1609                 })
    1610                 .on('click.xdsoft', function (xdevent) {
    1611                     xdevent.stopPropagation();
    1612                 });
    1613 
    1614             current_time_index = 0;
    1615 
    1616             setPos = function () {
    1617                 var offset = datetimepicker.data('input').offset(), top = offset.top + datetimepicker.data('input')[0].offsetHeight - 1, left = offset.left, position = "absolute";
    1618                 if (options.fixed) {
    1619                     top -= $(window).scrollTop();
    1620                     left -= $(window).scrollLeft();
    1621                     position = "fixed";
    1622                 } else {
    1623                     if (top + datetimepicker[0].offsetHeight > $(window).height() + $(window).scrollTop()) {
    1624                         top = offset.top - datetimepicker[0].offsetHeight + 1;
    1625                     }
    1626                     if (top < 0) {
    1627                         top = 0;
    1628                     }
    1629                     if (left + datetimepicker[0].offsetWidth > $(window).width()) {
    1630                         left = $(window).width() - datetimepicker[0].offsetWidth;
    1631                     }
    1632                 }
    1633                 datetimepicker.css({
    1634                     left: left,
    1635                     top: top,
    1636                     position: position
    1637                 });
    1638             };
    1639             datetimepicker
    1640                 .on('open.xdsoft', function (event) {
    1641                     var onShow = true;
    1642                     if (options.onShow && $.isFunction(options.onShow)) {
    1643                         onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
    1644                     }
    1645                     if (onShow !== false) {
    1646                         datetimepicker.show();
    1647                         setPos();
    1648                         $(window)
    1649                             .off('resize.xdsoft', setPos)
    1650                             .on('resize.xdsoft', setPos);
    1651 
    1652                         if (options.closeOnWithoutClick) {
    1653                             $([document.body, window]).on('mousedown.xdsoft', function arguments_callee6() {
    1654                                 datetimepicker.trigger('close.xdsoft');
    1655                                 $([document.body, window]).off('mousedown.xdsoft', arguments_callee6);
    1656                             });
    1657                         }
    1658                     }
    1659                 })
    1660                 .on('close.xdsoft', function (event) {
    1661                     var onClose = true;
    1662                     mounth_picker
    1663                         .find('.xdsoft_month,.xdsoft_year')
    1664                             .find('.xdsoft_select')
    1665                                 .hide();
    1666                     if (options.onClose && $.isFunction(options.onClose)) {
    1667                         onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
    1668                     }
    1669                     if (onClose !== false && !options.opened && !options.inline) {
    1670                         datetimepicker.hide();
    1671                     }
    1672                     event.stopPropagation();
    1673                 })
    1674                 .on('toggle.xdsoft', function (event) {
    1675                     if (datetimepicker.is(':visible')) {
    1676                         datetimepicker.trigger('close.xdsoft');
    1677                     } else {
    1678                         datetimepicker.trigger('open.xdsoft');
    1679                     }
    1680                 })
    1681                 .data('input', input);
    1682 
    1683             timer = 0;
    1684             timer1 = 0;
    1685 
    1686             datetimepicker.data('xdsoft_datetime', _xdsoft_datetime);
    1687             datetimepicker.setOptions(options);
    1688 
    1689             function getCurrentValue() {
    1690 
    1691                 var ct = false, time;
    1692 
    1693                 if (options.startDate) {
    1694                     ct = _xdsoft_datetime.strToDate(options.startDate);
    1695                 } else {
    1696                     ct = options.value || ((input && input.val && input.val()) ? input.val() : '');
    1697                     if (ct) {
    1698                         ct = _xdsoft_datetime.strToDateTime(ct);
    1699                     } else if (options.defaultDate) {
    1700                         ct = _xdsoft_datetime.strToDate(options.defaultDate);
    1701                         if (options.defaultTime) {
    1702                             time = _xdsoft_datetime.strtotime(options.defaultTime);
    1703                             ct.setHours(time.getHours());
    1704                             ct.setMinutes(time.getMinutes());
    1705                         }
    1706                     }
    1707                 }
    1708 
    1709                 if (ct && _xdsoft_datetime.isValidDate(ct)) {
    1710                     datetimepicker.data('changed', true);
    1711                 } else {
    1712                     ct = '';
    1713                 }
    1714 
    1715                 return ct || 0;
    1716             }
    1717 
    1718             _xdsoft_datetime.setCurrentTime(getCurrentValue());
    1719 
    1720             input
    1721                 .data('xdsoft_datetimepicker', datetimepicker)
    1722                 .on('open.xdsoft focusin.xdsoft mousedown.xdsoft', function (event) {
    1723                     if (input.is(':disabled') || input.is(':hidden') || !input.is(':visible') || (input.data('xdsoft_datetimepicker').is(':visible') && options.closeOnInputClick)) {
    1724                         return;
    1725                     }
    1726                     clearTimeout(timer);
    1727                     timer = setTimeout(function () {
    1728                         if (input.is(':disabled') || input.is(':hidden') || !input.is(':visible')) {
    1729                             return;
    1730                         }
    1731 
    1732                         triggerAfterOpen = true;
    1733                         _xdsoft_datetime.setCurrentTime(getCurrentValue());
    1734 
    1735                         datetimepicker.trigger('open.xdsoft');
    1736                     }, 100);
    1737                 })
    1738                 .on('keydown.xdsoft', function (event) {
    1739                     var val = this.value, elementSelector,
    1740                         key = event.which;
    1741                     if ([ENTER].indexOf(key) !== -1 && options.enterLikeTab) {
    1742                         elementSelector = $("input:visible,textarea:visible");
    1743                         datetimepicker.trigger('close.xdsoft');
    1744                         elementSelector.eq(elementSelector.index(this) + 1).focus();
    1745                         return false;
    1746                     }
    1747                     if ([TAB].indexOf(key) !== -1) {
    1748                         datetimepicker.trigger('close.xdsoft');
    1749                         return true;
    1750                     }
    1751                 });
    1752         };
    1753         destroyDateTimePicker = function (input) {
    1754             var datetimepicker = input.data('xdsoft_datetimepicker');
    1755             if (datetimepicker) {
    1756                 datetimepicker.data('xdsoft_datetime', null);
    1757                 datetimepicker.remove();
    1758                 input
    1759                     .data('xdsoft_datetimepicker', null)
    1760                     .off('.xdsoft');
    1761                 $(window).off('resize.xdsoft');
    1762                 $([window, document.body]).off('mousedown.xdsoft');
    1763                 if (input.unmousewheel) {
    1764                     input.unmousewheel();
    1765                 }
    1766             }
    1767         };
    1768         $(document)
    1769             .off('keydown.xdsoftctrl keyup.xdsoftctrl')
    1770             .on('keydown.xdsoftctrl', function (e) {
    1771                 if (e.keyCode === CTRLKEY) {
    1772                     ctrlDown = true;
    1773                 }
    1774             })
    1775             .on('keyup.xdsoftctrl', function (e) {
    1776                 if (e.keyCode === CTRLKEY) {
    1777                     ctrlDown = false;
    1778                 }
    1779             });
    1780         return this.each(function () {
    1781             var datetimepicker = $(this).data('xdsoft_datetimepicker');
    1782             if (datetimepicker) {
    1783                 if ($.type(opt) === 'string') {
    1784                     switch (opt) {
    1785                     case 'show':
    1786                         $(this).select().focus();
    1787                         datetimepicker.trigger('open.xdsoft');
    1788                         break;
    1789                     case 'hide':
    1790                         datetimepicker.trigger('close.xdsoft');
    1791                         break;
    1792                     case 'toggle':
    1793                         datetimepicker.trigger('toggle.xdsoft');
    1794                         break;
    1795                     case 'destroy':
    1796                         destroyDateTimePicker($(this));
    1797                         break;
    1798                     case 'reset':
    1799                         this.value = this.defaultValue;
    1800                         if (!this.value || !datetimepicker.data('xdsoft_datetime').isValidDate(Date.parseDate(this.value, options.format))) {
    1801                             datetimepicker.data('changed', false);
    1802                         }
    1803                         datetimepicker.data('xdsoft_datetime').setCurrentTime(this.value);
    1804                         break;
    1805                     }
    1806                 } else {
    1807                     datetimepicker
    1808                         .setOptions(opt);
    1809                 }
    1810                 return 0;
    1811             }
    1812             if ($.type(opt) !== 'string') {
    1813                 if (!options.lazyInit || options.open || options.inline) {
    1814                     createDateTimePicker($(this));
    1815                 } else {
    1816                     lazyInit($(this));
    1817                 }
    1818             }
    1819         });
    1820     };
    1821     $.fn.datetimepicker.defaults = default_options;
    1822 }(jQuery));
    1823 (function () {
    1824 
    1825 /*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
    1826  * Licensed under the MIT License (LICENSE.txt).
    1827  *
    1828  * Version: 3.1.12
    1829  *
    1830  * Requires: jQuery 1.2.2+
    1831  */
    1832 !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
    1833 
    1834 // Parse and Format Library
    1835 //http://www.xaprb.com/blog/2005/12/12/javascript-closures-for-runtime-efficiency/
    1836 /*
    1837  * Copyright (C) 2004 Baron Schwartz <baron at sequent dot org>
    1838  *
    1839  * This program is free software; you can redistribute it and/or modify it
    1840  * under the terms of the GNU Lesser General Public License as published by the
    1841  * Free Software Foundation, version 2.1.
    1842  *
    1843  * This program is distributed in the hope that it will be useful, but WITHOUT
    1844  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    1845  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
    1846  * details.
    1847  */
    1848 Date.parseFunctions={count:0};Date.parseRegexes=[];Date.formatFunctions={count:0};Date.prototype.dateFormat=function(b){if(b=="unixtime"){return parseInt(this.getTime()/1000);}if(Date.formatFunctions[b]==null){Date.createNewFormat(b);}var a=Date.formatFunctions[b];return this[a]();};Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;var code="Date.prototype."+funcName+" = function() {return ";var special=false;var ch="";for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\"){special=true;}else{if(special){special=false;code+="'"+String.escape(ch)+"' + ";}else{code+=Date.getFormatCode(ch);}}}eval(code.substring(0,code.length-3)+";}");};Date.getFormatCode=function(a){switch(a){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"this.getWeekOfYear() + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"O":return"this.getGMTOffset() + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(a)+"' + ";}};Date.parseDate=function(a,c){if(c=="unixtime"){return new Date(!isNaN(parseInt(a))?parseInt(a)*1000:0);}if(Date.parseFunctions[c]==null){Date.createParser(c);}var b=Date.parseFunctions[c];return Date[b](a);};Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++;var regexNum=Date.parseRegexes.length;var currentGroup=1;Date.parseFunctions[format]=funcName;var code="Date."+funcName+" = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, z = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {";var regex="";var special=false;var ch="";for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\"){special=true;}else{if(special){special=false;regex+=String.escape(ch);}else{obj=Date.formatCodeToRegex(ch,currentGroup);currentGroup+=obj.g;regex+=obj.s;if(obj.g&&obj.c){code+=obj.c;}}}}code+="if (y > 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}";code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$");eval(code);};Date.formatCodeToRegex=function(b,a){switch(b){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+a+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+a+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+a+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+a+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+a+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+a+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+a+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+a+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+a+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+a+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+a+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+a+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(b)};}};Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3");};Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0");};Date.prototype.getDayOfYear=function(){var a=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var b=0;b<this.getMonth();++b){a+=Date.daysInMonth[b];}return a+this.getDate();};Date.prototype.getWeekOfYear=function(){var b=this.getDayOfYear()+(4-this.getDay());var a=new Date(this.getFullYear(),0,1);var c=(7-a.getDay()+4);return String.leftPad(Math.ceil((b-c)/7)+1,2,"0");};Date.prototype.isLeapYear=function(){var a=this.getFullYear();return((a&3)==0&&(a%100||(a%400==0&&a)));};Date.prototype.getFirstDayOfMonth=function(){var a=(this.getDay()-(this.getDate()-1))%7;return(a<0)?(a+7):a;};Date.prototype.getLastDayOfMonth=function(){var a=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return(a<0)?(a+7):a;};Date.prototype.getDaysInMonth=function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;return Date.daysInMonth[this.getMonth()];};Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};String.escape=function(a){return a.replace(/('|\\)/g,"\\$1");};String.leftPad=function(d,b,c){var a=new String(d);if(c==null){c=" ";}while(a.length<b){a=c+a;}return a;};Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Date.y2kYear=50;Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"};
    1849 }());
     1!function(e){"use strict";var t={i18n:{ar:{months:["كانون الثاني","شباط","آذار","نيسان","مايو","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],dayOfWeek:["ن","ث","ع","خ","ج","س","ح"]},ro:{months:["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie"],dayOfWeek:["l","ma","mi","j","v","s","d"]},id:{months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],dayOfWeek:["Sen","Sel","Rab","Kam","Jum","Sab","Min"]},bg:{months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],dayOfWeek:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"]},fa:{months:["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],dayOfWeek:["یکشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"]},ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayOfWeek:["Вск","Пн","Вт","Ср","Чт","Пт","Сб"]},uk:{months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],dayOfWeek:["Ндл","Пнд","Втр","Срд","Чтв","Птн","Сбт"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},el:{months:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],dayOfWeek:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeek:["So","Mo","Di","Mi","Do","Fr","Sa"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeek:["zo","ma","di","wo","do","vr","za"]},tr:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeek:["Paz","Pts","Sal","Çar","Per","Cum","Cts"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeek:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeek:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],dayOfWeek:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."]},pl:{months:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],dayOfWeek:["nd","pn","wt","śr","cz","pt","sb"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeek:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"]},ch:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeek:["日","一","二","三","四","五","六"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeek:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},kr:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeek:["일","월","화","수","목","금","토"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeek:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeek:["Søn","Man","Tir","Ons","Tor","Fre","Lør"]},no:{months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],dayOfWeek:["Søn","Man","Tir","Ons","Tor","Fre","Lør"]},ja:{months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["日","月","火","水","木","金","土"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeek:["CN","T2","T3","T4","T5","T6","T7"]},sl:{months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],dayOfWeek:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"]},cs:{months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],dayOfWeek:["Ne","Po","Út","St","Čt","Pá","So"]},hu:{months:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],dayOfWeek:["Va","Hé","Ke","Sze","Cs","Pé","Szo"]},az:{months:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],dayOfWeek:["B","Be","Ça","Ç","Ca","C","Ş"]},bs:{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeek:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"]},ca:{months:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],dayOfWeek:["Dg","Dl","Dt","Dc","Dj","Dv","Ds"]},"en-GB":{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},et:{months:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],dayOfWeek:["P","E","T","K","N","R","L"]},eu:{months:["Urtarrila","Otsaila","Martxoa","Apirila","Maiatza","Ekaina","Uztaila","Abuztua","Iraila","Urria","Azaroa","Abendua"],dayOfWeek:["Ig.","Al.","Ar.","Az.","Og.","Or.","La."]},fi:{months:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],dayOfWeek:["Su","Ma","Ti","Ke","To","Pe","La"]},gl:{months:["Xan","Feb","Maz","Abr","Mai","Xun","Xul","Ago","Set","Out","Nov","Dec"],dayOfWeek:["Dom","Lun","Mar","Mer","Xov","Ven","Sab"]},hr:{months:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],dayOfWeek:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"]},ko:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeek:["일","월","화","수","목","금","토"]},lt:{months:["Sausio","Vasario","Kovo","Balandžio","Gegužės","Birželio","Liepos","Rugpjūčio","Rugsėjo","Spalio","Lapkričio","Gruodžio"],dayOfWeek:["Sek","Pir","Ant","Tre","Ket","Pen","Šeš"]},lv:{months:["Janvāris","Februāris","Marts","Aprīlis ","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],dayOfWeek:["Sv","Pr","Ot","Tr","Ct","Pk","St"]},mk:{months:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],dayOfWeek:["нед","пон","вто","сре","чет","пет","саб"]},mn:{months:["1-р сар","2-р сар","3-р сар","4-р сар","5-р сар","6-р сар","7-р сар","8-р сар","9-р сар","10-р сар","11-р сар","12-р сар"],dayOfWeek:["Дав","Мяг","Лха","Пүр","Бсн","Бям","Ням"]},"pt-BR":{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeek:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"]},sk:{months:["Január","Február","Marec","Apríl","Máj","Jún","Júl","August","September","Október","November","December"],dayOfWeek:["Ne","Po","Ut","St","Št","Pi","So"]},sq:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"sr-YU":{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeek:["Ned","Pon","Uto","Sre","čet","Pet","Sub"]},sr:{months:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],dayOfWeek:["нед","пон","уто","сре","чет","пет","суб"]},sv:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeek:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},"zh-TW":{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeek:["日","一","二","三","四","五","六"]},zh:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeek:["日","一","二","三","四","五","六"]},he:{months:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],dayOfWeek:["א'","ב'","ג'","ד'","ה'","ו'","שבת"]}},value:"",lang:"en",format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,monthChangeSpinner:!0,closeOnDateSelect:!1,closeOnWithoutClick:!0,closeOnInputClick:!0,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:"",onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,parentID:"body",timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,style:"",id:"",fixed:!1,roundTime:"round",className:"",weekends:[],disabledDates:[],yearOffset:0,beforeShowDay:null,enterLikeTab:!0};Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n,a;for(n=t||0,a=this.length;a>n;n+=1)if(this[n]===e)return n;return-1}),Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()},e.fn.xdsoftScroller=function(t){return this.each(function(){var n,a,r,o,s,i=e(this),u=function(e){var t,n={x:0,y:0};return"touchstart"===e.type||"touchmove"===e.type||"touchend"===e.type||"touchcancel"===e.type?(t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],n.x=t.clientX,n.y=t.clientY):("mousedown"===e.type||"mouseup"===e.type||"mousemove"===e.type||"mouseover"===e.type||"mouseout"===e.type||"mouseenter"===e.type||"mouseleave"===e.type)&&(n.x=e.clientX,n.y=e.clientY),n},d=100,l=!1,c=0,f=0,m=0,h=!1,g=0,p=function(){};return"hide"===t?(i.find(".xdsoft_scrollbar").hide(),void 0):(e(this).hasClass("xdsoft_scroller_box")||(n=i.children().eq(0),a=i[0].clientHeight,r=n[0].offsetHeight,o=e('<div class="xdsoft_scrollbar"></div>'),s=e('<div class="xdsoft_scroller"></div>'),o.append(s),i.addClass("xdsoft_scroller_box").append(o),p=function(e){var t=u(e).y-c+g;0>t&&(t=0),t+s[0].offsetHeight>m&&(t=m-s[0].offsetHeight),i.trigger("scroll_element.xdsoft_scroller",[d?t/d:0])},s.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(n){a||i.trigger("resize_scroll.xdsoft_scroller",[t]),c=u(n).y,g=parseInt(s.css("margin-top"),10),m=o[0].offsetHeight,"mousedown"===n.type?(document&&e(document.body).addClass("xdsoft_noselect"),e([document.body,window]).on("mouseup.xdsoft_scroller",function r(){e([document.body,window]).off("mouseup.xdsoft_scroller",r).off("mousemove.xdsoft_scroller",p).removeClass("xdsoft_noselect")}),e(document.body).on("mousemove.xdsoft_scroller",p)):(h=!0,n.stopPropagation(),n.preventDefault())}).on("touchmove",function(e){h&&(e.preventDefault(),p(e))}).on("touchend touchcancel",function(){h=!1,g=0}),i.on("scroll_element.xdsoft_scroller",function(e,t){a||i.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=t>1?1:0>t||isNaN(t)?0:t,s.css("margin-top",d*t),setTimeout(function(){n.css("marginTop",-parseInt((n[0].offsetHeight-a)*t,10))},10)}).on("resize_scroll.xdsoft_scroller",function(e,t,u){var l,c;a=i[0].clientHeight,r=n[0].offsetHeight,l=a/r,c=l*o[0].offsetHeight,l>1?s.hide():(s.show(),s.css("height",parseInt(c>10?c:10,10)),d=o[0].offsetHeight-s[0].offsetHeight,u!==!0&&i.trigger("scroll_element.xdsoft_scroller",[t||Math.abs(parseInt(n.css("marginTop"),10))/(r-a)]))}),i.on("mousewheel",function(e){var t=Math.abs(parseInt(n.css("marginTop"),10));return t-=20*e.deltaY,0>t&&(t=0),i.trigger("scroll_element.xdsoft_scroller",[t/(r-a)]),e.stopPropagation(),!1}),i.on("touchstart",function(e){l=u(e),f=Math.abs(parseInt(n.css("marginTop"),10))}),i.on("touchmove",function(e){if(l){e.preventDefault();var t=u(e);i.trigger("scroll_element.xdsoft_scroller",[(f-(t.y-l.y))/(r-a)])}}),i.on("touchend touchcancel",function(){l=!1,f=0})),i.trigger("resize_scroll.xdsoft_scroller",[t]),void 0)})},e.fn.datetimepicker=function(n){var a,r,o,s=48,i=57,u=96,d=105,l=17,c=46,f=13,m=27,h=8,g=37,p=38,x=39,y=40,D=9,v=116,b=65,T=67,k=86,w=90,M=89,S=!1,O=e.isPlainObject(n)||!n?e.extend(!0,{},t,n):e.extend(!0,{},t),_=0,F=function(e){e.on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function t(){e.is(":disabled")||e.is(":hidden")||!e.is(":visible")||e.data("xdsoft_datetimepicker")||(clearTimeout(_),_=setTimeout(function(){e.data("xdsoft_datetimepicker")||a(e),e.off("open.xdsoft focusin.xdsoft mousedown.xdsoft",t).trigger("open.xdsoft")},100))})};return a=function(t){function a(){var e,n=!1;return O.startDate?n=o.strToDate(O.startDate):(n=O.value||(t&&t.val&&t.val()?t.val():""),n?n=o.strToDateTime(n):O.defaultDate&&(n=o.strToDate(O.defaultDate),O.defaultTime&&(e=o.strtotime(O.defaultTime),n.setHours(e.getHours()),n.setMinutes(e.getMinutes())))),n&&o.isValidDate(n)?W.data("changed",!0):n="",n||0}var r,_,F,A,Y,W=e("<div "+(O.id?'id="'+O.id+'"':"")+" "+(O.style?'style="'+O.style+'"':"")+' class="xdsoft_datetimepicker xdsoft_'+O.theme+" xdsoft_noselect "+(O.weeks?" xdsoft_showweeks":"")+O.className+'"></div>'),C=e('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),J=e('<div class="xdsoft_datepicker active"></div>'),P=e('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span><i></i></div><div class="xdsoft_label xdsoft_year"><span></span><i></i></div><button type="button" class="xdsoft_next"></button></div>'),I=e('<div class="xdsoft_calendar"></div>'),N=e('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),H=N.find(".xdsoft_time_box").eq(0),z=e('<div class="xdsoft_time_variant"></div>'),j=e('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),L=e('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),R=!1,B=0,V=0;P.find(".xdsoft_month span").after(j),P.find(".xdsoft_year span").after(L),P.find(".xdsoft_month,.xdsoft_year").on("mousedown.xdsoft",function(t){var n,a,r=e(this).find(".xdsoft_select").eq(0),s=0,i=0,u=r.is(":visible");for(P.find(".xdsoft_select").hide(),o.currentTime&&(s=o.currentTime[e(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),r[u?"hide":"show"](),n=r.find("div.xdsoft_option"),a=0;a<n.length&&n.eq(a).data("value")!==s;a+=1)i+=n[0].offsetHeight;return r.xdsoftScroller(i/(r.children()[0].offsetHeight-r[0].clientHeight)),t.stopPropagation(),!1}),P.find(".xdsoft_select").xdsoftScroller().on("mousedown.xdsoft",function(e){e.stopPropagation(),e.preventDefault()}).on("mousedown.xdsoft",".xdsoft_option",function(){var t=o.currentTime.getFullYear();o&&o.currentTime&&o.currentTime[e(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](e(this).data("value")),e(this).parent().parent().hide(),W.trigger("xchange.xdsoft"),O.onChangeMonth&&e.isFunction(O.onChangeMonth)&&O.onChangeMonth.call(W,o.currentTime,W.data("input")),t!==o.currentTime.getFullYear()&&e.isFunction(O.onChangeYear)&&O.onChangeYear.call(W,o.currentTime,W.data("input"))}),W.setOptions=function(n){if(O=e.extend(!0,{},O,n),n.allowTimes&&e.isArray(n.allowTimes)&&n.allowTimes.length&&(O.allowTimes=e.extend(!0,[],n.allowTimes)),n.weekends&&e.isArray(n.weekends)&&n.weekends.length&&(O.weekends=e.extend(!0,[],n.weekends)),n.disabledDates&&e.isArray(n.disabledDates)&&n.disabledDates.length&&(O.disabledDates=e.extend(!0,[],n.disabledDates)),!O.open&&!O.opened||O.inline||t.trigger("open.xdsoft"),O.inline&&(R=!0,W.addClass("xdsoft_inline"),t.after(W).hide()),O.inverseButton&&(O.next="xdsoft_prev",O.prev="xdsoft_next"),O.datepicker?J.addClass("active"):J.removeClass("active"),O.timepicker?N.addClass("active"):N.removeClass("active"),O.value&&(t&&t.val&&t.val(O.value),o.setCurrentTime(O.value)),O.dayOfWeekStart=isNaN(O.dayOfWeekStart)?0:parseInt(O.dayOfWeekStart,10)%7,O.timepickerScrollbar||H.xdsoftScroller("hide"),O.minDate&&/^-(.*)$/.test(O.minDate)&&(O.minDate=o.strToDateTime(O.minDate).dateFormat(O.formatDate)),O.maxDate&&/^\+(.*)$/.test(O.maxDate)&&(O.maxDate=o.strToDateTime(O.maxDate).dateFormat(O.formatDate)),P.find(".xdsoft_today_button").css("visibility",O.todayButton?"visible":"hidden"),O.mask){var a=function(e){try{if(document.selection&&document.selection.createRange){var t=document.selection.createRange();return t.getBookmark().charCodeAt(2)-2}if(e.setSelectionRange)return e.selectionStart}catch(n){return 0}},r=function(e,t){if(e="string"==typeof e||e instanceof String?document.getElementById(e):e,!e)return!1;if(e.createTextRange){var n=e.createTextRange();return n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select(),!0}return e.setSelectionRange?(e.setSelectionRange(t,t),!0):!1},_=function(e,t){var n=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return new RegExp(n).test(t)};t.off("keydown.xdsoft"),O.mask===!0&&(O.mask=O.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),"string"===e.type(O.mask)&&(_(O.mask,t.val())||t.val(O.mask.replace(/[0-9]/g,"_")),t.on("keydown.xdsoft",function(n){var o,F,A=this.value,Y=n.which;if(Y>=s&&i>=Y||Y>=u&&d>=Y||Y===h||Y===c){for(o=a(this),F=Y!==h&&Y!==c?String.fromCharCode(Y>=u&&d>=Y?Y-s:Y):"_",Y!==h&&Y!==c||!o||(o-=1,F="_");/[^0-9_]/.test(O.mask.substr(o,1))&&o<O.mask.length&&o>0;)o+=Y===h||Y===c?-1:1;if(A=A.substr(0,o)+F+A.substr(o+1),""===e.trim(A))A=O.mask.replace(/[0-9]/g,"_");else if(o===O.mask.length)return n.preventDefault(),!1;for(o+=Y===h||Y===c?0:1;/[^0-9_]/.test(O.mask.substr(o,1))&&o<O.mask.length&&o>0;)o+=Y===h||Y===c?-1:1;_(O.mask,A)?(this.value=A,r(this,o)):""===e.trim(A)?this.value=O.mask.replace(/[0-9]/g,"_"):t.trigger("error_input.xdsoft")}else if(-1!==[b,T,k,w,M].indexOf(Y)&&S||-1!==[m,p,y,g,x,v,l,D,f].indexOf(Y))return!0;return n.preventDefault(),!1}))}O.validateOnBlur&&t.off("blur.xdsoft").on("blur.xdsoft",function(){O.allowBlank&&!e.trim(e(this).val()).length?(e(this).val(null),W.data("xdsoft_datetime").empty()):Date.parseDate(e(this).val(),O.format)?W.data("xdsoft_datetime").setCurrentTime(e(this).val()):(e(this).val(o.now().dateFormat(O.format)),W.data("xdsoft_datetime").setCurrentTime(e(this).val())),W.trigger("changedatetime.xdsoft")}),O.dayOfWeekStartPrev=0===O.dayOfWeekStart?6:O.dayOfWeekStart-1,W.trigger("xchange.xdsoft").trigger("afterOpen.xdsoft")},W.data("options",O).on("mousedown.xdsoft",function(e){return e.stopPropagation(),e.preventDefault(),L.hide(),j.hide(),!1}),H.append(z),H.xdsoftScroller(),W.on("afterOpen.xdsoft",function(){H.xdsoftScroller()}),W.append(J).append(N),O.withoutCopyright!==!0&&W.append(C),J.append(P).append(I),e(O.parentID).append(W),r=function(){var t=this;t.now=function(e){var n,a,r=new Date;return!e&&O.defaultDate&&(n=t.strToDate(O.defaultDate),r.setFullYear(n.getFullYear()),r.setMonth(n.getMonth()),r.setDate(n.getDate())),O.yearOffset&&r.setFullYear(r.getFullYear()+O.yearOffset),!e&&O.defaultTime&&(a=t.strtotime(O.defaultTime),r.setHours(a.getHours()),r.setMinutes(a.getMinutes())),r},t.isValidDate=function(e){return"[object Date]"!==Object.prototype.toString.call(e)?!1:!isNaN(e.getTime())},t.setCurrentTime=function(e){t.currentTime="string"==typeof e?t.strToDateTime(e):t.isValidDate(e)?e:t.now(),W.trigger("xchange.xdsoft")},t.empty=function(){t.currentTime=null},t.getCurrentTime=function(){return t.currentTime},t.nextMonth=function(){var n,a=t.currentTime.getMonth()+1;return 12===a&&(t.currentTime.setFullYear(t.currentTime.getFullYear()+1),a=0),n=t.currentTime.getFullYear(),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),a+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(a),O.onChangeMonth&&e.isFunction(O.onChangeMonth)&&O.onChangeMonth.call(W,o.currentTime,W.data("input")),n!==t.currentTime.getFullYear()&&e.isFunction(O.onChangeYear)&&O.onChangeYear.call(W,o.currentTime,W.data("input")),W.trigger("xchange.xdsoft"),a},t.prevMonth=function(){var n=t.currentTime.getMonth()-1;return-1===n&&(t.currentTime.setFullYear(t.currentTime.getFullYear()-1),n=11),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),n+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(n),O.onChangeMonth&&e.isFunction(O.onChangeMonth)&&O.onChangeMonth.call(W,o.currentTime,W.data("input")),W.trigger("xchange.xdsoft"),n},t.getWeekOfYear=function(e){var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e-t)/864e5+t.getDay()+1)/7)},t.strToDateTime=function(e){var n,a,r=[];return e&&e instanceof Date&&t.isValidDate(e)?e:(r=/^(\+|\-)(.*)$/.exec(e),r&&(r[2]=Date.parseDate(r[2],O.formatDate)),r&&r[2]?(n=r[2].getTime()-6e4*r[2].getTimezoneOffset(),a=new Date(o.now().getTime()+parseInt(r[1]+"1",10)*n)):a=e?Date.parseDate(e,O.format):t.now(),t.isValidDate(a)||(a=t.now()),a)},t.strToDate=function(e){if(e&&e instanceof Date&&t.isValidDate(e))return e;var n=e?Date.parseDate(e,O.formatDate):t.now(!0);return t.isValidDate(n)||(n=t.now(!0)),n},t.strtotime=function(e){if(e&&e instanceof Date&&t.isValidDate(e))return e;var n=e?Date.parseDate(e,O.formatTime):t.now(!0);return t.isValidDate(n)||(n=t.now(!0)),n},t.str=function(){return t.currentTime.dateFormat(O.format)},t.currentTime=this.now()},o=new r,P.find(".xdsoft_today_button").on("mousedown.xdsoft",function(){W.data("changed",!0),o.setCurrentTime(0),W.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){t.val(o.str()),W.trigger("close.xdsoft")}),P.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,a=!1;!function r(e){o.currentTime.getMonth();t.hasClass(O.next)?o.nextMonth():t.hasClass(O.prev)&&o.prevMonth(),O.monthChangeSpinner&&(a||(n=setTimeout(r,e||100)))}(500),e([document.body,window]).on("mouseup.xdsoft",function s(){clearTimeout(n),a=!0,e([document.body,window]).off("mouseup.xdsoft",s)})}),N.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,a=!1,r=110;!function o(e){var s=H[0].clientHeight,i=z[0].offsetHeight,u=Math.abs(parseInt(z.css("marginTop"),10));t.hasClass(O.next)&&i-s-O.timeHeightInTimePicker>=u?z.css("marginTop","-"+(u+O.timeHeightInTimePicker)+"px"):t.hasClass(O.prev)&&u-O.timeHeightInTimePicker>=0&&z.css("marginTop","-"+(u-O.timeHeightInTimePicker)+"px"),H.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(z.css("marginTop"),10)/(i-s))]),r=r>10?10:r-10,a||(n=setTimeout(o,e||r))}(500),e([document.body,window]).on("mouseup.xdsoft",function s(){clearTimeout(n),a=!0,e([document.body,window]).off("mouseup.xdsoft",s)})}),_=0,W.on("xchange.xdsoft",function(t){clearTimeout(_),_=setTimeout(function(){for(var t,a,r,s,i,u,d,l="",c=new Date(o.currentTime.getFullYear(),o.currentTime.getMonth(),1,12,0,0),f=0,m=o.now(),h=!1,g=!1,p=[],x=!0,y="",D="";c.getDay()!==O.dayOfWeekStart;)c.setDate(c.getDate()-1);for(l+="<table><thead><tr>",O.weeks&&(l+="<th></th>"),t=0;7>t;t+=1)l+="<th>"+O.i18n[O.lang].dayOfWeek[(t+O.dayOfWeekStart)%7]+"</th>";for(l+="</tr></thead>",l+="<tbody>",O.maxDate!==!1&&(h=o.strToDate(O.maxDate),h=new Date(h.getFullYear(),h.getMonth(),h.getDate(),23,59,59,999)),O.minDate!==!1&&(g=o.strToDate(O.minDate),g=new Date(g.getFullYear(),g.getMonth(),g.getDate()));f<o.currentTime.countDaysInMonth()||c.getDay()!==O.dayOfWeekStart||o.currentTime.getMonth()===c.getMonth();)p=[],f+=1,a=c.getDate(),r=c.getFullYear(),s=c.getMonth(),i=o.getWeekOfYear(c),p.push("xdsoft_date"),u=O.beforeShowDay&&e.isFunction(O.beforeShowDay.call)?O.beforeShowDay.call(W,c):null,h!==!1&&c>h||g!==!1&&g>c||u&&u[0]===!1?p.push("xdsoft_disabled"):-1!==O.disabledDates.indexOf(c.dateFormat(O.formatDate))&&p.push("xdsoft_disabled"),u&&""!==u[1]&&p.push(u[1]),o.currentTime.getMonth()!==s&&p.push("xdsoft_other_month"),(O.defaultSelect||W.data("changed"))&&o.currentTime.dateFormat(O.formatDate)===c.dateFormat(O.formatDate)&&p.push("xdsoft_current"),m.dateFormat(O.formatDate)===c.dateFormat(O.formatDate)&&p.push("xdsoft_today"),(0===c.getDay()||6===c.getDay()||-1===O.weekends.indexOf(c.dateFormat(O.formatDate)))&&p.push("xdsoft_weekend"),O.beforeShowDay&&e.isFunction(O.beforeShowDay)&&p.push(O.beforeShowDay(c)),x&&(l+="<tr>",x=!1,O.weeks&&(l+="<th>"+i+"</th>")),l+='<td data-date="'+a+'" data-month="'+s+'" data-year="'+r+'" class="xdsoft_date xdsoft_day_of_week'+c.getDay()+" "+p.join(" ")+'"><div>'+a+"</div></td>",c.getDay()===O.dayOfWeekStartPrev&&(l+="</tr>",x=!0),c.setDate(a+1);if(l+="</tbody></table>",I.html(l),P.find(".xdsoft_label span").eq(0).text(O.i18n[O.lang].months[o.currentTime.getMonth()]),P.find(".xdsoft_label span").eq(1).text(o.currentTime.getFullYear()),y="",D="",s="",d=function(e,t){var n=o.now();n.setHours(e),e=parseInt(n.getHours(),10),n.setMinutes(t),t=parseInt(n.getMinutes(),10),p=[],(O.maxTime!==!1&&o.strtotime(O.maxTime).getTime()<n.getTime()||O.minTime!==!1&&o.strtotime(O.minTime).getTime()>n.getTime())&&p.push("xdsoft_disabled"),(O.initTime||O.defaultSelect||W.data("changed"))&&parseInt(o.currentTime.getHours(),10)===parseInt(e,10)&&(O.step>59||Math[O.roundTime](o.currentTime.getMinutes()/O.step)*O.step===parseInt(t,10))&&(O.defaultSelect||W.data("changed")?p.push("xdsoft_current"):O.initTime&&p.push("xdsoft_init_time")),parseInt(m.getHours(),10)===parseInt(e,10)&&parseInt(m.getMinutes(),10)===parseInt(t,10)&&p.push("xdsoft_today"),y+='<div class="xdsoft_time '+p.join(" ")+'" data-hour="'+e+'" data-minute="'+t+'">'+n.dateFormat(O.formatTime)+"</div>"},O.allowTimes&&e.isArray(O.allowTimes)&&O.allowTimes.length)for(f=0;f<O.allowTimes.length;f+=1)D=o.strtotime(O.allowTimes[f]).getHours(),s=o.strtotime(O.allowTimes[f]).getMinutes(),d(D,s);else for(f=0,t=0;f<(O.hours12?12:24);f+=1)for(t=0;60>t;t+=O.step)D=(10>f?"0":"")+f,s=(10>t?"0":"")+t,d(D,s);for(z.html(y),n="",f=0,f=parseInt(O.yearStart,10)+O.yearOffset;f<=parseInt(O.yearEnd,10)+O.yearOffset;f+=1)n+='<div class="xdsoft_option '+(o.currentTime.getFullYear()===f?"xdsoft_current":"")+'" data-value="'+f+'">'+f+"</div>";for(L.children().eq(0).html(n),f=0,n="";11>=f;f+=1)n+='<div class="xdsoft_option '+(o.currentTime.getMonth()===f?"xdsoft_current":"")+'" data-value="'+f+'">'+O.i18n[O.lang].months[f]+"</div>";j.children().eq(0).html(n),e(W).trigger("generate.xdsoft")},10),t.stopPropagation()}).on("afterOpen.xdsoft",function(){if(O.timepicker){var e,t,n,a;z.find(".xdsoft_current").length?e=".xdsoft_current":z.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e?(t=H[0].clientHeight,n=z[0].offsetHeight,a=z.find(e).index()*O.timeHeightInTimePicker+1,a>n-t&&(a=n-t),H.trigger("scroll_element.xdsoft_scroller",[parseInt(a,10)/(n-t)])):H.trigger("scroll_element.xdsoft_scroller",[0])}}),F=0,I.on("click.xdsoft","td",function(n){n.stopPropagation(),F+=1;var a=e(this),r=o.currentTime;return(void 0===r||null===r)&&(o.currentTime=o.now(),r=o.currentTime),a.hasClass("xdsoft_disabled")?!1:(r.setDate(1),r.setFullYear(a.data("year")),r.setMonth(a.data("month")),r.setDate(a.data("date")),W.trigger("select.xdsoft",[r]),t.val(o.str()),(F>1||O.closeOnDateSelect===!0||0===O.closeOnDateSelect&&!O.timepicker)&&!O.inline&&W.trigger("close.xdsoft"),O.onSelectDate&&e.isFunction(O.onSelectDate)&&O.onSelectDate.call(W,o.currentTime,W.data("input"),n),W.data("changed",!0),W.trigger("xchange.xdsoft"),W.trigger("changedatetime.xdsoft"),setTimeout(function(){F=0},200),void 0)}),z.on("click.xdsoft","div",function(t){t.stopPropagation();var n=e(this),a=o.currentTime;return(void 0===a||null===a)&&(o.currentTime=o.now(),a=o.currentTime),n.hasClass("xdsoft_disabled")?!1:(a.setHours(n.data("hour")),a.setMinutes(n.data("minute")),W.trigger("select.xdsoft",[a]),W.data("input").val(o.str()),O.inline||W.trigger("close.xdsoft"),O.onSelectTime&&e.isFunction(O.onSelectTime)&&O.onSelectTime.call(W,o.currentTime,W.data("input"),t),W.data("changed",!0),W.trigger("xchange.xdsoft"),W.trigger("changedatetime.xdsoft"),void 0)}),J.on("mousewheel.xdsoft",function(e){return O.scrollMonth?(e.deltaY<0?o.nextMonth():o.prevMonth(),!1):!0}),t.on("mousewheel.xdsoft",function(e){return O.scrollInput?!O.datepicker&&O.timepicker?(A=z.find(".xdsoft_current").length?z.find(".xdsoft_current").eq(0).index():0,A+e.deltaY>=0&&A+e.deltaY<z.children().length&&(A+=e.deltaY),z.children().eq(A).length&&z.children().eq(A).trigger("mousedown"),!1):O.datepicker&&!O.timepicker?(J.trigger(e,[e.deltaY,e.deltaX,e.deltaY]),t.val&&t.val(o.str()),W.trigger("changedatetime.xdsoft"),!1):void 0:!0}),W.on("changedatetime.xdsoft",function(t){if(O.onChangeDateTime&&e.isFunction(O.onChangeDateTime)){var n=W.data("input");O.onChangeDateTime.call(W,o.currentTime,n,t),delete O.value,n.trigger("change")}}).on("generate.xdsoft",function(){O.onGenerate&&e.isFunction(O.onGenerate)&&O.onGenerate.call(W,o.currentTime,W.data("input")),R&&(W.trigger("afterOpen.xdsoft"),R=!1)}).on("click.xdsoft",function(e){e.stopPropagation()}),A=0,Y=function(){var t=W.data("input").offset(),n=t.top+W.data("input")[0].offsetHeight-1,a=t.left,r="absolute";O.fixed?(n-=e(window).scrollTop(),a-=e(window).scrollLeft(),r="fixed"):(n+W[0].offsetHeight>e(window).height()+e(window).scrollTop()&&(n=t.top-W[0].offsetHeight+1),0>n&&(n=0),a+W[0].offsetWidth>e(window).width()&&(a=e(window).width()-W[0].offsetWidth)),W.css({left:a,top:n,position:r})},W.on("open.xdsoft",function(t){var n=!0;O.onShow&&e.isFunction(O.onShow)&&(n=O.onShow.call(W,o.currentTime,W.data("input"),t)),n!==!1&&(W.show(),Y(),e(window).off("resize.xdsoft",Y).on("resize.xdsoft",Y),O.closeOnWithoutClick&&e([document.body,window]).on("mousedown.xdsoft",function a(){W.trigger("close.xdsoft"),e([document.body,window]).off("mousedown.xdsoft",a)}))}).on("close.xdsoft",function(t){var n=!0;P.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),O.onClose&&e.isFunction(O.onClose)&&(n=O.onClose.call(W,o.currentTime,W.data("input"),t)),n===!1||O.opened||O.inline||W.hide(),t.stopPropagation()}).on("toggle.xdsoft",function(){W.is(":visible")?W.trigger("close.xdsoft"):W.trigger("open.xdsoft")}).data("input",t),B=0,V=0,W.data("xdsoft_datetime",o),W.setOptions(O),o.setCurrentTime(a()),t.data("xdsoft_datetimepicker",W).on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function(){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||t.data("xdsoft_datetimepicker").is(":visible")&&O.closeOnInputClick||(clearTimeout(B),B=setTimeout(function(){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(R=!0,o.setCurrentTime(a()),W.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(t){var n,a=(this.value,t.which);return-1!==[f].indexOf(a)&&O.enterLikeTab?(n=e("input:visible,textarea:visible"),W.trigger("close.xdsoft"),n.eq(n.index(this)+1).focus(),!1):-1!==[D].indexOf(a)?(W.trigger("close.xdsoft"),!0):void 0})},r=function(t){var n=t.data("xdsoft_datetimepicker");n&&(n.data("xdsoft_datetime",null),n.remove(),t.data("xdsoft_datetimepicker",null).off(".xdsoft"),e(window).off("resize.xdsoft"),e([window,document.body]).off("mousedown.xdsoft"),t.unmousewheel&&t.unmousewheel())},e(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(e){e.keyCode===l&&(S=!0)
     2}).on("keyup.xdsoftctrl",function(e){e.keyCode===l&&(S=!1)}),this.each(function(){var t=e(this).data("xdsoft_datetimepicker");if(t){if("string"===e.type(n))switch(n){case"show":e(this).select().focus(),t.trigger("open.xdsoft");break;case"hide":t.trigger("close.xdsoft");break;case"toggle":t.trigger("toggle.xdsoft");break;case"destroy":r(e(this));break;case"reset":this.value=this.defaultValue,this.value&&t.data("xdsoft_datetime").isValidDate(Date.parseDate(this.value,O.format))||t.data("changed",!1),t.data("xdsoft_datetime").setCurrentTime(this.value)}else t.setOptions(n);return 0}"string"!==e.type(n)&&(!O.lazyInit||O.open||O.inline?a(e(this)):F(e(this)))})},e.fn.datetimepicker.defaults=t}(jQuery),function(){!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var s=t||window.event,i=u.call(arguments,1),d=0,c=0,f=0,m=0,h=0,g=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(f=-1*s.detail),"wheelDelta"in s&&(f=s.wheelDelta),"wheelDeltaY"in s&&(f=s.wheelDeltaY),"wheelDeltaX"in s&&(c=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(c=-1*f,f=0),d=0===f?c:f,"deltaY"in s&&(f=-1*s.deltaY,d=f),"deltaX"in s&&(c=s.deltaX,0===f&&(d=-1*c)),0!==f||0!==c){if(1===s.deltaMode){var p=e.data(this,"mousewheel-line-height");d*=p,f*=p,c*=p}else if(2===s.deltaMode){var x=e.data(this,"mousewheel-page-height");d*=x,f*=x,c*=x}if(m=Math.max(Math.abs(f),Math.abs(c)),(!o||o>m)&&(o=m,a(s,m)&&(o/=40)),a(s,m)&&(d/=40,c/=40,f/=40),d=Math[d>=1?"floor":"ceil"](d/o),c=Math[c>=1?"floor":"ceil"](c/o),f=Math[f>=1?"floor":"ceil"](f/o),l.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();h=t.clientX-y.left,g=t.clientY-y.top}return t.deltaX=c,t.deltaY=f,t.deltaFactor=o,t.offsetX=h,t.offsetY=g,t.deltaMode=0,i.unshift(t,d,c,f),r&&clearTimeout(r),r=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,i)}}function n(){o=null}function a(e,t){return l.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var r,o,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],i="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],u=Array.prototype.slice;if(e.event.fixHooks)for(var d=s.length;d;)e.event.fixHooks[s[--d]]=e.event.mouseHooks;var l=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=i.length;n;)this.addEventListener(i[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",l.getLineHeight(this)),e.data(this,"mousewheel-page-height",l.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=i.length;n;)this.removeEventListener(i[--n],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),a=n["offsetParent"in e.fn?"offsetParent":"parent"]();return a.length||(a=e("body")),parseInt(a.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),Date.parseFunctions={count:0},Date.parseRegexes=[],Date.formatFunctions={count:0},Date.prototype.dateFormat=function(e){if("unixtime"==e)return parseInt(this.getTime()/1e3);null==Date.formatFunctions[e]&&Date.createNewFormat(e);var t=Date.formatFunctions[e];return this[t]()},Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;for(var code="Date.prototype."+funcName+" = function() {return ",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,code+="'"+String.escape(ch)+"' + "):code+=Date.getFormatCode(ch):special=!0;eval(code.substring(0,code.length-3)+";}")},Date.getFormatCode=function(e){switch(e){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"this.getWeekOfYear() + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"O":return"this.getGMTOffset() + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(e)+"' + "}},Date.parseDate=function(e,t){if("unixtime"==t)return new Date(isNaN(parseInt(e))?0:1e3*parseInt(e));null==Date.parseFunctions[t]&&Date.createParser(t);var n=Date.parseFunctions[t];return Date[n](e)},Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1;Date.parseFunctions[format]=funcName;for(var code="Date."+funcName+" = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, z = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {",regex="",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,regex+=String.escape(ch)):(obj=Date.formatCodeToRegex(ch,currentGroup),currentGroup+=obj.g,regex+=obj.s,obj.g&&obj.c&&(code+=obj.c)):special=!0;code+="if (y > 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}",code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}",Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$"),eval(code)},Date.formatCodeToRegex=function(e,t){switch(e){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+t+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+t+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+t+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+t+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+t+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+t+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(e)}}},Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3")},Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0")},Date.prototype.getDayOfYear=function(){var e=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var t=0;t<this.getMonth();++t)e+=Date.daysInMonth[t];return e+this.getDate()},Date.prototype.getWeekOfYear=function(){var e=this.getDayOfYear()+(4-this.getDay()),t=new Date(this.getFullYear(),0,1),n=7-t.getDay()+4;return String.leftPad(Math.ceil((e-n)/7)+1,2,"0")},Date.prototype.isLeapYear=function(){var e=this.getFullYear();return 0==(3&e)&&(e%100||e%400==0&&e)},Date.prototype.getFirstDayOfMonth=function(){var e=(this.getDay()-(this.getDate()-1))%7;return 0>e?e+7:e},Date.prototype.getLastDayOfMonth=function(){var e=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return 0>e?e+7:e},Date.prototype.getDaysInMonth=function(){return Date.daysInMonth[1]=this.isLeapYear()?29:28,Date.daysInMonth[this.getMonth()]},Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},String.escape=function(e){return e.replace(/('|\\)/g,"\\$1")},String.leftPad=function(e,t,n){var a=new String(e);for(null==n&&(n=" ");a.length<t;)a=n+a;return a},Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31],Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Date.y2kYear=50,Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"}}();
  • kopatheme/trunk/assets/js/media-uploader.min.js

    r1353276 r1471418  
    1 /**
    2  * Kopa Framework Admin Media Uploader JS
    3  * Author: Kopatheme
    4  * Copyright: 2014 Kopatheme
    5  * License: GPLv2 or later
    6  * Used localized variable: kopa_upload_l10n
    7  */
    8 jQuery(document).ready(function(a){function e(e,f){e.preventDefault();var g=a(this),h=f.find(".kopa_upload"),i=h.data("type"),j=d.indexOf(i),k={title:g.data("choose"),button:{text:g.data("update"),close:!1}};c=f,i&&(-1===j&&d.push(i),k.library={type:i}),kopaframework_modals&&(b=kopaframework_modals[j]),b?b.open():(b=wp.media.frames.kopaframework_upload=wp.media(k),b.on("select",function(){var d=b.state().get("selection").first();b.close(),c.find(".kopa_upload").val(d.attributes.url),"image"==d.attributes.type&&(c.find(".kopa_screenshot").empty().hide().removeClass("kopa_hide").append('<img src="'+d.attributes.url+'"><a class="kopa_remove_image">'+kopa_upload_l10n.remove+"</a>").slideDown("fast"),(a("body").hasClass("widgets-php")||a("body").hasClass("post-php"))&&(c.find("img").css("max-width","100%"),a("<br>").insertBefore(c.find(".kopa_remove_image").addClass("button"))));var e=c.find(".kopa_upload_button").addClass("kopa_remove_file").removeClass("kopa_upload_button");e.text()?e.text(kopa_upload_l10n.remove):e.val()&&e.val(kopa_upload_l10n.remove)}),kopaframework_modals.push(b)),b.open()}function f(b,c){b.preventDefault(),c.find(".kopa_remove_image").hide(),c.find(".kopa_upload").val(""),c.find(".kopa_screenshot").slideUp("fast");var d=c.find(".kopa_remove_file").addClass("kopa_upload_button").removeClass("kopa_remove_file");d.text()?d.text(kopa_upload_l10n.upload):d.val()&&d.val(kopa_upload_l10n.upload),a(".kopa_section_upload .kopa_upload_notice").length>0&&a(".kopa_upload_button").remove()}Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=+b||0;if(1/0===Math.abs(f)&&(f=0),f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);e>c;){if(c in d&&d[c]===a)return c;c++}return-1});var b,c,d=[];kopaframework_modals=[],a("body").on("click",".kopa_remove_image, .kopa_remove_file",function(b){f(b,a(this).closest(".kopa_section"))}),a("body").on("click",".kopa_upload_button",function(b){e(b,a(this).closest(".kopa_section"))})});
     1jQuery(document).ready(function(a){function o(o,e){o.preventDefault();var n=a(this),l=e.find(".kopa_upload"),i=l.data("type"),s=r.indexOf(i),d={title:n.data("choose"),button:{text:n.data("update"),close:!1}};p=e,i&&(-1===s&&r.push(i),d.library={type:i}),kopaframework_modals&&(t=kopaframework_modals[s]),t?t.open():(t=wp.media.frames.kopaframework_upload=wp.media(d),t.on("select",function(){var o=t.state().get("selection").first();t.close(),p.find(".kopa_upload").val(o.attributes.url),"image"==o.attributes.type&&(p.find(".kopa_screenshot").empty().hide().removeClass("kopa_hide").append('<img src="'+o.attributes.url+'"><a class="kopa_remove_image">'+kopa_upload_l10n.remove+"</a>").slideDown("fast"),(a("body").hasClass("widgets-php")||a("body").hasClass("post-php"))&&(p.find("img").css("max-width","100%"),a("<br>").insertBefore(p.find(".kopa_remove_image").addClass("button"))));var e=p.find(".kopa_upload_button").addClass("kopa_remove_file").removeClass("kopa_upload_button");e.text()?e.text(kopa_upload_l10n.remove):e.val()&&e.val(kopa_upload_l10n.remove)}),kopaframework_modals.push(t)),t.open()}function e(o,e){o.preventDefault(),e.find(".kopa_remove_image").hide(),e.find(".kopa_upload").val(""),e.find(".kopa_screenshot").slideUp("fast");var t=e.find(".kopa_remove_file").addClass("kopa_upload_button").removeClass("kopa_remove_file");t.text()?t.text(kopa_upload_l10n.upload):t.val()&&t.val(kopa_upload_l10n.upload),a(".kopa_section_upload .kopa_upload_notice").length>0&&a(".kopa_upload_button").remove()}Array.prototype.indexOf||(Array.prototype.indexOf=function(a,o){var e;if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),p=t.length>>>0;if(0===p)return-1;var r=+o||0;if(1/0===Math.abs(r)&&(r=0),r>=p)return-1;for(e=Math.max(r>=0?r:p-Math.abs(r),0);p>e;){if(e in t&&t[e]===a)return e;e++}return-1});var t,p,r=[];kopaframework_modals=[],a("body").on("click",".kopa_remove_image, .kopa_remove_file",function(o){e(o,a(this).closest(".kopa_section"))}),a("body").on("click",".kopa_upload_button",function(e){o(e,a(this).closest(".kopa_section"))})});
  • kopatheme/trunk/includes/admin/class-kopa-admin-assets.php

    r1470471 r1471418  
    5757          wp_register_style( 'kopa_datetimepicker', KF()->framework_url() . '/assets/css/jquery.datetimepicker.css', array(), KOPA_FRAMEWORK_VERSION );
    5858        }
    59 
    60             /**
    61             * @since 1.1.9
    62             * @add `appearance_page_kopa-framework` to check in_array()
    63             *
    64             * @since 1.2.0
    65              * @add `edit-tags.php` to check in_array()
    66             */
    67            
    68             if ( in_array( $hook, array( 'widgets.php', 'post.php', 'post-new.php', 'appearance_page_kopa-framework', 'edit-tags.php' ) ) ) {
     59       
     60        /**
     61        * @since 1.1.9
     62        * @add `appearance_page_kopa-framework` to check in_array()
     63        *
     64        * @since 1.2.0
     65         * @add `edit-tags.php`, `term.php` to check in_array()
     66        */
     67       
     68        if ( in_array( $hook, array( 'widgets.php', 'post.php', 'post-new.php', 'appearance_page_kopa-framework', 'edit-tags.php','term.php' ) ) ) {
    6969                wp_enqueue_style( 'kopa_widget' );
    7070          if ( $advanced_field ) {
  • kopatheme/trunk/includes/admin/fields/default_fields.php

    r1470471 r1471418  
    103103function kopa_form_field_textarea( $wrap_start, $wrap_end, $settings, $value ) {
    104104    $rows = !empty( $settings['rows'] ) ? 'rows="' . $settings['rows'] . '"' : '';
     105   
     106    $class = 'large-text';
     107    if ( isset( $value['class'] ) && !empty( $value['class'] ) ) {
     108        $class = esc_attr( $value['class'] );
     109    }
     110
    105111    $output = '';
    106112    $output.=$wrap_start;
    107     $output .= sprintf( '<textarea type="text" id="%1$s" name="%1$s" %2$s>%3$s</textarea>', $settings['id'], $rows, esc_textarea( $value ) );
     113    $output .= sprintf( '<textarea class="%4$s" type="text" id="%1$s" name="%1$s" %2$s>%3$s</textarea>', $settings['id'], $rows, esc_textarea( $value ), $class );
    108114    $output.=$wrap_end;
    109115
  • kopatheme/trunk/kopa-framework.php

    r1470471 r1471418  
    33 * Plugin Name: Kopa Framework
    44 * Description: A WordPress framework by Kopatheme.
    5  * Version: 1.2.0
     5 * Version: 1.2.1
    66 * Author: Kopa Theme
    77 * Author URI: http://kopatheme.com
     
    3535     * @var string framework version
    3636     */
    37     public $version = '1.1.6';
     37    public $version = '1.2.0';
    3838
    3939    /**
  • kopatheme/trunk/readme.txt

    r1470471 r1471418  
    11=== Kopa Framework ===
    2 Contributors: kopatheme, vutuansw, tranthethang
     2Contributors: kopatheme, vutuan.sw, tranthethang
    33Tags: framework, tool, feature, theme-options, sidebar-manager, layout-manager, custom-layouts
    44Donate link:
    55Requires at least: 4.1
    66Tested up to: 4.5.3
    7 Stable tag: 1.2.0
     7Stable tag: 1.2.1
    88License: GPLv2 or later
    99
     
    2121
    2222== Changelog ==
     23= 1.2.1 =
     24* Fix some CSS
     25
    2326= 1.2.0 =
    24  * Change the way to reset 'theme option'.
    25  * Fix bug css icon dialog
     27* Change the way to reset 'theme option'.
     28* Fix bug css icon dialog
    2629
    2730= 1.1.9 =
    28  * Allow third-party add custom taxonomy field.
    29  * Add form field files in /include/admin/fields
    30  * Add new field: image
     31* Allow third-party add custom taxonomy field.
     32* Add form field files in /include/admin/fields
     33* Add new field: image
     34
    3135= 1.1.8 =
    3236* English wording.
Note: See TracChangeset for help on using the changeset viewer.