diff --git a/main/css/base.css b/main/css/base.css index 71170e1961..7e9de8de9d 100644 --- a/main/css/base.css +++ b/main/css/base.css @@ -2,8 +2,6 @@ * Common CSS for all themes */ -@import url('bootstrap.css'); - /* some changes to the bootstrap.css */ /* when doing a var_dump*/ @@ -13,7 +11,7 @@ pre { /* chzn-select fix */ select { - width: auto; + /* width: auto; */ } .invisible { @@ -32,141 +30,11 @@ legend { padding: 40px 0px 0px 0px; } -header #logo { - padding: 0px 0px 15px 0px; -} - -.subnav .brand { - display: none; -} - -.subnav .navbar-inner { - box-shadow: none; -} - -.subnav .dropdown-menu li a { - color: #333; -} - -.subnav li a { - margin: 0px; -} - -.subnav { -} - -.subnav .btn-navbar { - background: #efefef; -} - -.subnav .btn-navbar .icon-bar { - background-color: #888; -} - -.subnav-fixed { - position: fixed; - top: 0px; - left: 0; - right: 0; - z-index: 1030; - border-color: #d5d5d5; - border-width: 0 0 1px; /* drop the border on the fixed edges */ - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - /*-webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1); - -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1); - box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1); - */ -} - -.subnav { - margin-bottom: 0px; -} - -/* Subnav */ -.subnav .navbar-inner { - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - - /* default subnav color */ - background-color: #eeeeee; /* Old browsers */ - background-repeat: repeat-x; /* Repeat the gradient */ - background-image: -moz-linear-gradient(top, #f5f5f5 0%, #eeeeee 100%); /* FF3.6+ */ - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f5f5f5), color-stop(100%, #eeeeee)); /* Chrome,Safari4+ */ - background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #eeeeee 100%); /* Chrome 10+,Safari 5.1+ */ - background-image: -ms-linear-gradient(top, #f5f5f5 0%, #eeeeee 100%); /* IE10+ */ - background-image: -o-linear-gradient(top, #f5f5f5 0%, #eeeeee 100%); /* Opera 11.10+ */ - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#f5f5f5', endColorstr = '#eeeeee', GradientType = 0); /* IE6-9 */ - background-image: linear-gradient(top, #f5f5f5 0%, #eeeeee 100%); /* W3C */ - border: 1px solid #e5e5e5; - margin-bottom: 0px; - padding-left: 4px; - padding-right: 4px; - - /* end default subnav background colors */ -} - -/* fixing gray border next the logout button */ -.subnav .nav-tabs .open .dropdown-toggle, .subnav .nav-pills .open .dropdown-toggle, .nav > .open.active > a:hover { - border-color: transparent; -} - -.subnav .nav > li > a { - margin: 0; - border-left: 1px solid #f5f5f5; - border-right: 1px solid #e5e5e5; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.subnav .nav > #current > a, -.subnav .nav > #current > a:hover { - padding-left: 13px; - color: #777; - background-color: #e9e9e9; - border-right-color: #ddd; - border-left: 0; - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .05); - -moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .05); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, .05); -} - -.subnav .nav > #current > a .caret, -.subnav .nav > #current > a:hover .caret { - border-top-color: #777; -} - -.subnav .nav > li:last-child > a { - border-right: 0; -} - -.subnav .dropdown-menu { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} - -.subnav .nav > li:first-child > a, -.subnav .nav > li:first-child > a:hover { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} - -.subnav .nav > li > a:hover { - text-decoration: none; - color: #aaa; -} - -.subnav .nav > li a { - text-shadow: none; +header { } -header { - margin-bottom: 11px; +header #logo { + padding: 0px 0px 15px 0px; } .breadcrumb { @@ -179,7 +47,7 @@ header { } /* To fix the increase/decrease buttons */ label, input, button, select, textarea, p { - font-size: inherit; + /* font-size: inherit; */ } .badge-group { @@ -280,7 +148,7 @@ form .formw input { .nav-list > .active > a, .nav-list > .active > a:hover { - background-color: #999999; + background-color: #eeeed6; } .sidebar-nav { @@ -323,51 +191,36 @@ form .formw input { width: 110px; } -html, body { - margin: 0; - padding: 0; -} - -/* the sticky effect */ -html { - height: 100%; -} +/* Sticky footer*/ +html, body { - /* hack ignored by non-IE to enable ie to support :hover on button */ - behavior: url("/main/css/csshover3.htc"); - margin: 0; - padding: 0; - background-color: #fff; - height: 100%; /* stick */ + height: 100%; + /* The html and body elements cannot have any padding or margin. */ } -/* Sticky footer*/ +/* Wrapper for page content to push down footer */ #wrapper { min-height: 100%; - height: auto !important; - height: 100%; - margin: 0 auto -9em; /* Do not change this value */ -} - -#topbar { - z-index: 9000; /* bug when using full area fckeditor */ + height: auto; + /* Negative indent footer by its height */ + margin: 0 auto -60px; + /* Pad bottom by footer height */ + padding: 0 0 60px; } +/* Set the fixed height of the footer here */ footer { - margin-top: 17px; - padding-top: 17px; - height: 9em; - width: 100%; + height: 150px; + background-color: #f5f5f5; } -/* Sticky footer*/ -.push { - height: 9em; /* Very important */ +footer .container .row { + padding-top:50px; } -footer .container .row { - padding-top: 50px; +.with-toolbar { + margin-top: 80px; } #footer_right #admin_name, #footer_right #software_name { @@ -387,12 +240,14 @@ footer .container .row { } .actions { - background: #efefef; - border: 1px solid #ccc; - margin-bottom: 11px; - height: 32px; - padding: 2px 2px 2px 14px; - vertical-align: middle; + min-height: 20px; + padding: 8px 15px; + margin-top: 10px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + border-radius: 4px; + height: 50px; } .actions .actions-pagination { @@ -3548,17 +3403,14 @@ form .formw .freeze { z-index: 200; } -#language_list { - width: 80px !important; - min-width: 140px !important; -} + /***************************************************** * LOGIN AND LANGUAGE FORM * *****************************************************/ #lang_form { - text-align: left; + /* text-align: left; */ } .form_login { @@ -5288,30 +5140,42 @@ i.size-32.icon-new-work { margin-left:120px; } + .form-signin { - max-width: 300px; - padding: 19px 29px 29px; - margin: 0 auto 20px; - background-color: #fff; - border: 1px solid #e5e5e5; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; - -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05); - -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05); - box-shadow: 0 1px 2px rgba(0,0,0,.05); + max-width: 330px; + padding: 15px; + margin: 0 auto; } .form-signin .form-signin-heading, .form-signin .checkbox { margin-bottom: 10px; } -.form-signin input[type="text"], -.form-signin input[type="password"] { +.form-signin .checkbox { + font-weight: normal; +} +.form-signin .form-control { + position: relative; font-size: 16px; height: auto; - margin-bottom: 15px; - padding: 7px 9px; + padding: 10px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } +.form-signin .form-control:focus { + z-index: 2; +} +.form-signin input[type="text"] { + margin-bottom: -1px; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} +.form-signin input[type="password"] { + margin-bottom: 10px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} + .question_no_title { text-align: center; diff --git a/main/css/chamilo/default.css b/main/css/chamilo/default.css index a6e04b2190..9f4d5b1408 100644 --- a/main/css/chamilo/default.css +++ b/main/css/chamilo/default.css @@ -11,7 +11,7 @@ a { color :#3757f7 } a:visited { - text-decoration: none; + text-decoration: none; } a:hover { text-decoration: none; @@ -22,49 +22,82 @@ a:active { color : #3757f7; } -.subnav .navbar-inner { - background-color: #00AAE3; /* Old browsers */ - background-repeat: repeat-x; /* Repeat the gradient */ - background-image: -moz-linear-gradient(top, #028DC2 0%, #00AAE3 100%); /* FF3.6+ */ - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#028DC2), color-stop(100%,#00AAE3)); /* Chrome,Safari4+ */ - background-image: -webkit-linear-gradient(top, #028DC2 0%, #00AAE3 100%); /* Chrome 10+,Safari 5.1+ */ - background-image: -ms-linear-gradient(top, #028DC2 0%,#00AAE3 100%); /* IE10+ */ - background-image: -o-linear-gradient(top, #028DC2 0%,#00AAE3 100%); /* Opera 11.10+ */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#028DC2', endColorstr='#00AAE3',GradientType=0 ); /* IE6-9 */ - background-image: linear-gradient(top, #028DC2 0%,#00AAE3 100%); /* W3C */ -} +/** Navbar */ -.subnav .nav > li > a { - border-left: 1px solid #0EA0D4; - border-right: 1px solid #0EA0D4; - color: white; +.navbar-default { + background-color: #0191C7; + border-color: #0073A0; } - -.subnav .nav > #current > a, -.subnav .nav > #current > a:hover { - color: #fff; - background-color: #028DC2; - border-right-color: #028DC2; +.navbar-default .navbar-brand { + color: #ECF0F1; } - -.subnav li a { - color:#fff; +.navbar-default .navbar-brand:hover, +.navbar-default .navbar-brand:focus { + color: #ffffff; } - -/* Green hover */ -.subnav .navbar-inner li a:hover { - background: none repeat scroll 0 0 #8ECB50; - color: #fff; +.navbar-default .navbar-nav > li > a { + color: #ECF0F1; +} +.navbar-default .navbar-nav > li > a:hover, +.navbar-default .navbar-nav > li > a:focus { + color: #ffffff; +} +.navbar-default .navbar-nav > .active > a, +.navbar-default .navbar-nav > .active > a:hover, +.navbar-default .navbar-nav > .active > a:focus { + color: #ffffff; + background-color: #0073A0; +} +.navbar-default .navbar-nav > .open > a, +.navbar-default .navbar-nav > .open > a:hover, +.navbar-default .navbar-nav > .open > a:focus { + color: #ffffff; + background-color: #0073A0; +} +.navbar-default .navbar-nav > .dropdown > a .caret { + border-top-color: #ECF0F1; + border-bottom-color: #ECF0F1; +} +.navbar-default .navbar-nav > .dropdown > a:hover .caret, +.navbar-default .navbar-nav > .dropdown > a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.navbar-default .navbar-nav > .open > a .caret, +.navbar-default .navbar-nav > .open > a:hover .caret, +.navbar-default .navbar-nav > .open > a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.navbar-default .navbar-toggle { + border-color: #0073A0; +} +.navbar-default .navbar-toggle:hover, +.navbar-default .navbar-toggle:focus { + background-color: #0073A0; +} +.navbar-default .navbar-toggle .icon-bar { + background-color: #ECF0F1; +} +@media (max-width: 767px) { + .navbar-default .navbar-nav .open .dropdown-menu > li > a { + color: #ECF0F1; + } + .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, + .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { + color: #ffffff; + } } + /***************************************************** * FOOTER STYLES * *****************************************************/ -footer { +footer { background-color: #037fb2; background-image: url(images/bg-footer.gif); - background-repeat:repeat-x; - color:#ffffff; + background-repeat:repeat-x; + color:#ffffff; } /***************************************************** @@ -98,7 +131,7 @@ footer { #social-content-online { background-color:#00AAE3; } - + .admin_section li { background-image:url(images/bullet.gif); } @@ -114,7 +147,7 @@ footer { background:transparent url('images/logob4.gif') no-repeat; } -#bottomhellomindfactory { +#bottomhellomindfactory { background:transparent url('images/textologo.jpg') no-repeat; } @@ -168,10 +201,10 @@ button.upload { } button.arrowr, input.arrowr { - background-image:url(images/2rightarrow.gif); + background-image:url(images/2rightarrow.gif); } button.arrowl, input.arrowl { - background-image:url(images/2leftarrow.gif); + background-image:url(images/2leftarrow.gif); } .refresh { background-image:url(images/refresh.png); diff --git a/main/document/showinframes.php b/main/document/showinframes.php index 3fcdcee7c4..321f2890e5 100644 --- a/main/document/showinframes.php +++ b/main/document/showinframes.php @@ -147,7 +147,7 @@ if (api_get_setting('show_glossary_in_documents') == 'ismanual') { // $("
I am a div courses
").prependTo("body"); }, "top.mainFrame", { load: [ - {type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.min.js"}, + {type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js"}, {type:"script", id:"_fr2", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.highlight.js"}, {type:"script", id:"_fr3", src:"'.api_get_path(WEB_LIBRARY_PATH).'fckeditor/editor/plugins/glossary/fck_glossary_manual.js"} ] @@ -161,7 +161,7 @@ if (api_get_setting('show_glossary_in_documents') == 'ismanual') { }, "top.mainFrame", { load: [ - {type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.min.js"}, + {type:"script", id:"_fr1", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js"}, {type:"script", id:"_fr4", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery-ui/smoothness/jquery-ui-1.8.21.custom.min.js"}, {type:"stylesheet", id:"_fr5", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery-ui/smoothness/jquery-ui-1.8.21.custom.css"}, {type:"script", id:"_fr2", src:"'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.highlight.js"}, @@ -243,7 +243,7 @@ if (!$jplayer_supported && $execute_iframe) { $htmlHeadXtra[] = ''; $htmlHeadXtra[] = ''; diff --git a/main/inc/lib/course.lib.php b/main/inc/lib/course.lib.php index 4f6adcefa3..7bc5e2405f 100644 --- a/main/inc/lib/course.lib.php +++ b/main/inc/lib/course.lib.php @@ -2543,13 +2543,9 @@ class CourseManager * Builds the course block in user_portal.php * @todo use Twig */ - public static function course_item_html($params, $is_sub_content = false) { - global $app; - if ($app['full_width']) { - $rowDiv = '
'; - } else { - $rowDiv = '
'; - } + public static function course_item_html($params, $is_sub_content = false) + { + $rowDiv = '
'; $html = ''; $class = "well course-box"; if ($is_sub_content) { @@ -2560,9 +2556,9 @@ class CourseManager } $html .= '
'; $html .= $rowDiv; - $html .= '
'; + $html .= ''; return $html; } - public static function course_item_parent($main_content, $sub_content, $sub_sub_content = null) { + public static function course_item_parent($main_content, $sub_content, $sub_sub_content = null) + { return '
'.$main_content.$sub_content.$sub_sub_content.'
'; } @@ -2619,7 +2615,8 @@ class CourseManager * @param bool Whether to show the document quick-loader or not * @return void */ - public static function displaySpecialCourses($user_id, $filter, $load_dirs, $getCount, $start = null, $maxPerPage = null) { + public static function displaySpecialCourses($user_id, $filter, $load_dirs, $getCount, $start = null, $maxPerPage = null) + { $user_id = intval($user_id); $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE); $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER); diff --git a/main/inc/lib/course_home.lib.php b/main/inc/lib/course_home.lib.php index f57aeea667..8d870ae949 100644 --- a/main/inc/lib/course_home.lib.php +++ b/main/inc/lib/course_home.lib.php @@ -582,7 +582,7 @@ class CourseHome */ public static function show_tools_category($all_tools_list, $rows = false) { - $rowDiv = '
'; + $rowDiv = '
'; $theme = api_get_setting('homepage_view'); if ($theme == 'vertical_activity') { //ordering by get_lang name @@ -796,7 +796,7 @@ class CourseHome $html .= $rowDiv; } - $html .= '
'; + $html .= '
'; $image = (substr($item['tool']['image'], 0, strpos($item['tool']['image'], '.'))).'.png'; $original_image = Display::return_icon($image, $item['name'], array('id'=>'toolimage_'.$item['tool']['id']), ICON_SIZE_BIG, false); @@ -837,7 +837,7 @@ class CourseHome $html .= $rowDiv; } - $html .= '
'; + $html .= '
'; $content = $item['extra']; $content .= $item['visibility']; $content .= $item['icon']; diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index e49970b1a8..1804a9e294 100644 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -1073,9 +1073,9 @@ class Display public static function form_row($label, $form_item) { - $label = self::span($label, array('class' => 'control-label')); - $form_item = self::div($form_item, array('class' => 'controls')); - return self::div($label.$form_item, array('class' => 'control-group')); + $label = self::span($label, array('class' => 'col-sm-2 control-label')); + $form_item = self::div($form_item, array('class' => 'col-sm-10')); + return self::div($label.$form_item, array('class' => 'form-group')); } /** diff --git a/main/inc/lib/formvalidator/FormValidator.class.php b/main/inc/lib/formvalidator/FormValidator.class.php index f2a8748b30..17c3159dbb 100644 --- a/main/inc/lib/formvalidator/FormValidator.class.php +++ b/main/inc/lib/formvalidator/FormValidator.class.php @@ -147,10 +147,9 @@ class FormValidator extends HTML_QuickForm //Form template $form_template = ' -
+ {content} -
-
+ {hidden} '; $renderer->setFormTemplate($form_template); @@ -164,12 +163,13 @@ class FormValidator extends HTML_QuickForm $renderer->setElementTemplate($element_template); } else { $element_template = ' -
-
+ -
+ +
{element} @@ -177,13 +177,17 @@ class FormValidator extends HTML_QuickForm -

{label_2}

+ {label_2} - {error} + {error}
+ + + +
'; $renderer->setElementTemplate($element_template); @@ -215,13 +219,13 @@ class FormValidator extends HTML_QuickForm } //Set Header template - $renderer->setHeaderTemplate('{header}'); + $renderer->setHeaderTemplate('

{header}

'); //Set required field template HTML_QuickForm::setRequiredNote('* ' . get_lang('ThisFieldIsRequired') . ''); $required_note_template = << -
{requiredNote}
+
+
{requiredNote}
EOT; $renderer->setRequiredNoteTemplate($required_note_template); @@ -539,6 +543,29 @@ EOT; } return $return_value; } + + /** + * @return string + */ + public function getDoubleMultipleSelectTemplate() + { + return ' +
+ +
+ + + + {error} +
+ +
{element}
+
+
'; + } } // @todo remove this! diff --git a/main/inc/lib/javascript/bootstrap/bootstrap.js b/main/inc/lib/javascript/bootstrap/bootstrap.js deleted file mode 100644 index 76659463b5..0000000000 --- a/main/inc/lib/javascript/bootstrap/bootstrap.js +++ /dev/null @@ -1,2109 +0,0 @@ -/* =================================================== - * bootstrap-transition.js v2.3.0 - * http://twitter.github.com/bootstrap/javascript.html#transitions - * =================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) - * ======================================================= */ - - $(function () { - - $.support.transition = (function () { - - var transitionEnd = (function () { - - var el = document.createElement('bootstrap') - , transEndEventNames = { - 'WebkitTransition':'webkitTransitionEnd', 'MozTransition':'transitionend', 'OTransition':'oTransitionEnd otransitionend', 'transition':'transitionend' - } - , name - - for (name in transEndEventNames) { - if (el.style[name] !== undefined) { - return transEndEventNames[name] - } - } - - }()) - - return transitionEnd && { - end:transitionEnd - } - - })() - - }) - -}(window.jQuery); -/* ========================================================== - * bootstrap-alert.js v2.3.0 - * http://twitter.github.com/bootstrap/javascript.html#alerts - * ========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* ALERT CLASS DEFINITION - * ====================== */ - - var dismiss = '[data-dismiss="alert"]' - , Alert = function (el) { - $(el).on('click', dismiss, this.close) - } - - Alert.prototype.close = function (e) { - var $this = $(this) - , selector = $this.attr('data-target') - , $parent - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 - } - - $parent = $(selector) - - e && e.preventDefault() - - $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) - - $parent.trigger(e = $.Event('close')) - - if (e.isDefaultPrevented()) return - - $parent.removeClass('in') - - function removeElement() { - $parent - .trigger('closed') - .remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent.on($.support.transition.end, removeElement) : - removeElement() - } - - - /* ALERT PLUGIN DEFINITION - * ======================= */ - - var old = $.fn.alert - - $.fn.alert = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('alert') - if (!data) $this.data('alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - $.fn.alert.Constructor = Alert - - - /* ALERT NO CONFLICT - * ================= */ - - $.fn.alert.noConflict = function () { - $.fn.alert = old - return this - } - - - /* ALERT DATA-API - * ============== */ - - $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) - -}(window.jQuery); -/* ============================================================ - * bootstrap-button.js v2.3.0 - * http://twitter.github.com/bootstrap/javascript.html#buttons - * ============================================================ - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* BUTTON PUBLIC CLASS DEFINITION - * ============================== */ - - var Button = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, $.fn.button.defaults, options) - } - - Button.prototype.setState = function (state) { - var d = 'disabled' - , $el = this.$element - , data = $el.data() - , val = $el.is('input') ? 'val' : 'html' - - state = state + 'Text' - data.resetText || $el.data('resetText', $el[val]()) - - $el[val](data[state] || this.options[state]) - - // push to event loop to allow forms to submit - setTimeout(function () { - state == 'loadingText' ? - $el.addClass(d).attr(d, d) : - $el.removeClass(d).removeAttr(d) - }, 0) - } - - Button.prototype.toggle = function () { - var $parent = this.$element.closest('[data-toggle="buttons-radio"]') - - $parent && $parent - .find('.active') - .removeClass('active') - - this.$element.toggleClass('active') - } - - - /* BUTTON PLUGIN DEFINITION - * ======================== */ - - var old = $.fn.button - - $.fn.button = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('button') - , options = typeof option == 'object' && option - if (!data) $this.data('button', (data = new Button(this, options))) - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } - - $.fn.button.defaults = { - loadingText:'loading...' - } - - $.fn.button.Constructor = Button - - - /* BUTTON NO CONFLICT - * ================== */ - - $.fn.button.noConflict = function () { - $.fn.button = old - return this - } - - - /* BUTTON DATA-API - * =============== */ - - $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - $btn.button('toggle') - }) - -}(window.jQuery); -/* ========================================================== - * bootstrap-carousel.js v2.3.0 - * http://twitter.github.com/bootstrap/javascript.html#carousel - * ========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* CAROUSEL CLASS DEFINITION - * ========================= */ - - var Carousel = function (element, options) { - this.$element = $(element) - this.$indicators = this.$element.find('.carousel-indicators') - this.options = options - this.options.pause == 'hover' && this.$element - .on('mouseenter', $.proxy(this.pause, this)) - .on('mouseleave', $.proxy(this.cycle, this)) - } - - Carousel.prototype = { - - cycle:function (e) { - if (!e) this.paused = false - if (this.interval) clearInterval(this.interval); - this.options.interval - && !this.paused - && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) - return this - }, getActiveIndex:function () { - this.$active = this.$element.find('.item.active') - this.$items = this.$active.parent().children() - return this.$items.index(this.$active) - }, to:function (pos) { - var activeIndex = this.getActiveIndex() - , that = this - - if (pos > (this.$items.length - 1) || pos < 0) return - - if (this.sliding) { - return this.$element.one('slid', function () { - that.to(pos) - }) - } - - if (activeIndex == pos) { - return this.pause().cycle() - } - - return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) - }, pause:function (e) { - if (!e) this.paused = true - if (this.$element.find('.next, .prev').length && $.support.transition.end) { - this.$element.trigger($.support.transition.end) - this.cycle() - } - clearInterval(this.interval) - this.interval = null - return this - }, next:function () { - if (this.sliding) return - return this.slide('next') - }, prev:function () { - if (this.sliding) return - return this.slide('prev') - }, slide:function (type, next) { - var $active = this.$element.find('.item.active') - , $next = next || $active[type]() - , isCycling = this.interval - , direction = type == 'next' ? 'left' : 'right' - , fallback = type == 'next' ? 'first' : 'last' - , that = this - , e - - this.sliding = true - - isCycling && this.pause() - - $next = $next.length ? $next : this.$element.find('.item')[fallback]() - - e = $.Event('slide', { - relatedTarget:$next[0], direction:direction - }) - - if ($next.hasClass('active')) return - - if (this.$indicators.length) { - this.$indicators.find('.active').removeClass('active') - this.$element.one('slid', function () { - var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) - $nextIndicator && $nextIndicator.addClass('active') - }) - } - - if ($.support.transition && this.$element.hasClass('slide')) { - this.$element.trigger(e) - if (e.isDefaultPrevented()) return - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - this.$element.one($.support.transition.end, function () { - $next.removeClass([type, direction].join(' ')).addClass('active') - $active.removeClass(['active', direction].join(' ')) - that.sliding = false - setTimeout(function () { - that.$element.trigger('slid') - }, 0) - }) - } else { - this.$element.trigger(e) - if (e.isDefaultPrevented()) return - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger('slid') - } - - isCycling && this.cycle() - - return this - } - - } - - - /* CAROUSEL PLUGIN DEFINITION - * ========================== */ - - var old = $.fn.carousel - - $.fn.carousel = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('carousel') - , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) - , action = typeof option == 'string' ? option : options.slide - if (!data) $this.data('carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (action) data[action]() - else if (options.interval) data.pause().cycle() - }) - } - - $.fn.carousel.defaults = { - interval:5000, pause:'hover' - } - - $.fn.carousel.Constructor = Carousel - - - /* CAROUSEL NO CONFLICT - * ==================== */ - - $.fn.carousel.noConflict = function () { - $.fn.carousel = old - return this - } - - /* CAROUSEL DATA-API - * ================= */ - - $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { - var $this = $(this), href - , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 - , options = $.extend({}, $target.data(), $this.data()) - , slideIndex - - $target.carousel(options) - - if (slideIndex = $this.attr('data-slide-to')) { - $target.data('carousel').pause().to(slideIndex).cycle() - } - - e.preventDefault() - }) - -}(window.jQuery); -/* ============================================================= - * bootstrap-collapse.js v2.3.0 - * http://twitter.github.com/bootstrap/javascript.html#collapse - * ============================================================= - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* COLLAPSE PUBLIC CLASS DEFINITION - * ================================ */ - - var Collapse = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, $.fn.collapse.defaults, options) - - if (this.options.parent) { - this.$parent = $(this.options.parent) - } - - this.options.toggle && this.toggle() - } - - Collapse.prototype = { - - constructor:Collapse, dimension:function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - }, show:function () { - var dimension - , scroll - , actives - , hasData - - if (this.transitioning || this.$element.hasClass('in')) return - - dimension = this.dimension() - scroll = $.camelCase(['scroll', dimension].join('-')) - actives = this.$parent && this.$parent.find('> .accordion-group > .in') - - if (actives && actives.length) { - hasData = actives.data('collapse') - if (hasData && hasData.transitioning) return - actives.collapse('hide') - hasData || actives.data('collapse', null) - } - - this.$element[dimension](0) - this.transition('addClass', $.Event('show'), 'shown') - $.support.transition && this.$element[dimension](this.$element[0][scroll]) - }, hide:function () { - var dimension - if (this.transitioning || !this.$element.hasClass('in')) return - dimension = this.dimension() - this.reset(this.$element[dimension]()) - this.transition('removeClass', $.Event('hide'), 'hidden') - this.$element[dimension](0) - }, reset:function (size) { - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - [dimension](size || 'auto') - [0].offsetWidth - - this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') - - return this - }, transition:function (method, startEvent, completeEvent) { - var that = this - , complete = function () { - if (startEvent.type == 'show') that.reset() - that.transitioning = 0 - that.$element.trigger(completeEvent) - } - - this.$element.trigger(startEvent) - - if (startEvent.isDefaultPrevented()) return - - this.transitioning = 1 - - this.$element[method]('in') - - $.support.transition && this.$element.hasClass('collapse') ? - this.$element.one($.support.transition.end, complete) : - complete() - }, toggle:function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - - } - - - /* COLLAPSE PLUGIN DEFINITION - * ========================== */ - - var old = $.fn.collapse - - $.fn.collapse = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('collapse') - , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option) - if (!data) $this.data('collapse', (data = new Collapse(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.collapse.defaults = { - toggle:true - } - - $.fn.collapse.Constructor = Collapse - - - /* COLLAPSE NO CONFLICT - * ==================== */ - - $.fn.collapse.noConflict = function () { - $.fn.collapse = old - return this - } - - - /* COLLAPSE DATA-API - * ================= */ - - $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { - var $this = $(this), href - , target = $this.attr('data-target') - || e.preventDefault() - || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 - , option = $(target).data('collapse') ? 'toggle' : $this.data() - $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') - $(target).collapse(option) - }) - -}(window.jQuery); -/* ============================================================ - * bootstrap-dropdown.js v2.3.0 - * http://twitter.github.com/bootstrap/javascript.html#dropdowns - * ============================================================ - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* DROPDOWN CLASS DEFINITION - * ========================= */ - - var toggle = '[data-toggle=dropdown]' - , Dropdown = function (element) { - var $el = $(element).on('click.dropdown.data-api', this.toggle) - $('html').on('click.dropdown.data-api', function () { - $el.parent().removeClass('open') - }) - } - - Dropdown.prototype = { - - constructor:Dropdown, toggle:function (e) { - var $this = $(this) - , $parent - , isActive - - if ($this.is('.disabled, :disabled')) return - - $parent = getParent($this) - - isActive = $parent.hasClass('open') - - clearMenus() - - if (!isActive) { - $parent.toggleClass('open') - } - - $this.focus() - - return false - }, keydown:function (e) { - var $this - , $items - , $active - , $parent - , isActive - , index - - if (!/(38|40|27)/.test(e.keyCode)) return - - $this = $(this) - - e.preventDefault() - e.stopPropagation() - - if ($this.is('.disabled, :disabled')) return - - $parent = getParent($this) - - isActive = $parent.hasClass('open') - - if (!isActive || (isActive && e.keyCode == 27)) { - if (e.which == 27) $parent.find(toggle).focus() - return $this.click() - } - - $items = $('[role=menu] li:not(.divider):visible a', $parent) - - if (!$items.length) return - - index = $items.index($items.filter(':focus')) - - if (e.keyCode == 38 && index > 0) index-- // up - if (e.keyCode == 40 && index < $items.length - 1) index++ // down - if (!~index) index = 0 - - $items - .eq(index) - .focus() - } - - } - - function clearMenus() { - $(toggle).each(function () { - getParent($(this)).removeClass('open') - }) - } - - function getParent($this) { - var selector = $this.attr('data-target') - , $parent - - if (!selector) { - selector = $this.attr('href') - selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 - } - - $parent = selector && $(selector) - - if (!$parent || !$parent.length) $parent = $this.parent() - - return $parent - } - - - /* DROPDOWN PLUGIN DEFINITION - * ========================== */ - - var old = $.fn.dropdown - - $.fn.dropdown = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('dropdown') - if (!data) $this.data('dropdown', (data = new Dropdown(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - $.fn.dropdown.Constructor = Dropdown - - - /* DROPDOWN NO CONFLICT - * ==================== */ - - $.fn.dropdown.noConflict = function () { - $.fn.dropdown = old - return this - } - - - /* APPLY TO STANDARD DROPDOWN ELEMENTS - * =================================== */ - - $(document) - .on('click.dropdown.data-api', clearMenus) - .on('click.dropdown.data-api', '.dropdown form', function (e) { - e.stopPropagation() - }) - .on('.dropdown-menu', function (e) { - e.stopPropagation() - }) - .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle) - .on('keydown.dropdown.data-api', toggle + ', [role=menu]', Dropdown.prototype.keydown) - -}(window.jQuery); -/* ========================================================= - * bootstrap-modal.js v2.3.0 - * http://twitter.github.com/bootstrap/javascript.html#modals - * ========================================================= - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================= */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* MODAL CLASS DEFINITION - * ====================== */ - - var Modal = function (element, options) { - this.options = options - this.$element = $(element) - .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) - this.options.remote && this.$element.find('.modal-body').load(this.options.remote) - } - - Modal.prototype = { - - constructor:Modal, toggle:function () { - return this[!this.isShown ? 'show' : 'hide']() - }, show:function () { - var that = this - , e = $.Event('show') - - this.$element.trigger(e) - - if (this.isShown || e.isDefaultPrevented()) return - - this.isShown = true - - this.escape() - - this.backdrop(function () { - var transition = $.support.transition && that.$element.hasClass('fade') - - if (!that.$element.parent().length) { - that.$element.appendTo(document.body) //don't move modals dom position - } - - that.$element.show() - - if (transition) { - that.$element[0].offsetWidth // force reflow - } - - that.$element - .addClass('in') - .attr('aria-hidden', false) - - that.enforceFocus() - - transition ? - that.$element.one($.support.transition.end, function () { - that.$element.focus().trigger('shown') - }) : - that.$element.focus().trigger('shown') - - }) - }, hide:function (e) { - e && e.preventDefault() - - var that = this - - e = $.Event('hide') - - this.$element.trigger(e) - - if (!this.isShown || e.isDefaultPrevented()) return - - this.isShown = false - - this.escape() - - $(document).off('focusin.modal') - - this.$element - .removeClass('in') - .attr('aria-hidden', true) - - $.support.transition && this.$element.hasClass('fade') ? - this.hideWithTransition() : - this.hideModal() - }, enforceFocus:function () { - var that = this - $(document).on('focusin.modal', function (e) { - if (that.$element[0] !== e.target && !that.$element.has(e.target).length) { - that.$element.focus() - } - }) - }, escape:function () { - var that = this - if (this.isShown && this.options.keyboard) { - this.$element.on('keyup.dismiss.modal', function (e) { - e.which == 27 && that.hide() - }) - } else if (!this.isShown) { - this.$element.off('keyup.dismiss.modal') - } - }, hideWithTransition:function () { - var that = this - , timeout = setTimeout(function () { - that.$element.off($.support.transition.end) - that.hideModal() - }, 500) - - this.$element.one($.support.transition.end, function () { - clearTimeout(timeout) - that.hideModal() - }) - }, hideModal:function () { - var that = this - this.$element.hide() - this.backdrop(function () { - that.removeBackdrop() - that.$element.trigger('hidden') - }) - }, removeBackdrop:function () { - this.$backdrop.remove() - this.$backdrop = null - }, backdrop:function (callback) { - var that = this - , animate = this.$element.hasClass('fade') ? 'fade' : '' - - if (this.isShown && this.options.backdrop) { - var doAnimate = $.support.transition && animate - - this.$backdrop = $('