diff options
author | Marvin Borner | 2018-05-23 22:23:28 +0200 |
---|---|---|
committer | Marvin Borner | 2018-05-23 22:23:28 +0200 |
commit | b66a61addb6c8e66cb26fcf74b532d68891267e4 (patch) | |
tree | 05e9449ff25bdc98f68105f41923ccb9f6ef5095 /main/app/sprinkles/core/assets/userfrosting | |
parent | 1d4ef435177a5f9b6d1a289800d933e49be0c550 (diff) |
Refactored code, many fixes and improvements in chat backend+frontend
Diffstat (limited to 'main/app/sprinkles/core/assets/userfrosting')
24 files changed, 2803 insertions, 2376 deletions
diff --git a/main/app/sprinkles/core/assets/userfrosting/css/AdminLTE-skins-all.css b/main/app/sprinkles/core/assets/userfrosting/css/AdminLTE-skins-all.css index 53577c4..e487cdb 100644 --- a/main/app/sprinkles/core/assets/userfrosting/css/AdminLTE-skins-all.css +++ b/main/app/sprinkles/core/assets/userfrosting/css/AdminLTE-skins-all.css @@ -3,11 +3,13 @@ * ---------- */ .skin-blue .main-header .navbar { - background-color: #3c8dbc; + background-color: #3c8dbc; } + .skin-blue .main-header .navbar .nav > li > a { - color: #ffffff; + color: #ffffff; } + .skin-blue .main-header .navbar .nav > li > a:hover, .skin-blue .main-header .navbar .nav > li > a:active, .skin-blue .main-header .navbar .nav > li > a:focus, @@ -15,138 +17,170 @@ .skin-blue .main-header .navbar .nav .open > a:hover, .skin-blue .main-header .navbar .nav .open > a:focus, .skin-blue .main-header .navbar .nav > .active > a { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; } + .skin-blue .main-header .navbar .sidebar-toggle { - color: #ffffff; + color: #ffffff; } + .skin-blue .main-header .navbar .sidebar-toggle:hover { - color: #f6f6f6; - background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); } + .skin-blue .main-header .navbar .sidebar-toggle { - color: #fff; + color: #fff; } + .skin-blue .main-header .navbar .sidebar-toggle:hover { - background-color: #367fa9; + background-color: #367fa9; } + @media (max-width: 767px) { - .skin-blue .main-header .navbar .dropdown-menu li.divider { - background-color: rgba(255, 255, 255, 0.1); - } - .skin-blue .main-header .navbar .dropdown-menu li a { - color: #fff; - } - .skin-blue .main-header .navbar .dropdown-menu li a:hover { - background: #367fa9; - } -} + .skin-blue .main-header .navbar .dropdown-menu li.divider { + background-color: rgba(255, 255, 255, 0.1); + } + + .skin-blue .main-header .navbar .dropdown-menu li a { + color: #fff; + } + + .skin-blue .main-header .navbar .dropdown-menu li a:hover { + background: #367fa9; + } +} + .skin-blue .main-header .logo { - background-color: #367fa9; - color: #ffffff; - border-bottom: 0 solid transparent; + background-color: #367fa9; + color: #ffffff; + border-bottom: 0 solid transparent; } + .skin-blue .main-header .logo:hover { - background-color: #357ca5; + background-color: #357ca5; } + .skin-blue .main-header li.user-header { - background-color: #3c8dbc; + background-color: #3c8dbc; } + .skin-blue .content-header { - background: transparent; + background: transparent; } + .skin-blue .wrapper, .skin-blue .main-sidebar, .skin-blue .left-side { - background-color: #222d32; + background-color: #222d32; } + .skin-blue .user-panel > .info, .skin-blue .user-panel > .info > a { - color: #fff; + color: #fff; } + .skin-blue .sidebar-menu > li.header { - color: #4b646f; - background: #1a2226; + color: #4b646f; + background: #1a2226; } + .skin-blue .sidebar-menu > li > a { - border-left: 3px solid transparent; + border-left: 3px solid transparent; } + .skin-blue .sidebar-menu > li:hover > a, .skin-blue .sidebar-menu > li.active > a { - color: #ffffff; - background: #1e282c; - border-left-color: #3c8dbc; + color: #ffffff; + background: #1e282c; + border-left-color: #3c8dbc; } + .skin-blue .sidebar-menu > li > .treeview-menu { - margin: 0 1px; - background: #2c3b41; + margin: 0 1px; + background: #2c3b41; } + .skin-blue .sidebar a { - color: #b8c7ce; + color: #b8c7ce; } + .skin-blue .sidebar a:hover { - text-decoration: none; + text-decoration: none; } + .skin-blue .treeview-menu > li > a { - color: #8aa4af; + color: #8aa4af; } + .skin-blue .treeview-menu > li.active > a, .skin-blue .treeview-menu > li > a:hover { - color: #ffffff; + color: #ffffff; } + .skin-blue .sidebar-form { - border-radius: 3px; - border: 1px solid #374850; - margin: 10px 10px; + border-radius: 3px; + border: 1px solid #374850; + margin: 10px 10px; } + .skin-blue .sidebar-form input[type="text"], .skin-blue .sidebar-form .btn { - box-shadow: none; - background-color: #374850; - border: 1px solid transparent; - height: 35px; + box-shadow: none; + background-color: #374850; + border: 1px solid transparent; + height: 35px; } + .skin-blue .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; + color: #666; + border-top-left-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 2px; } + .skin-blue .sidebar-form input[type="text"]:focus, .skin-blue .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; + background-color: #fff; + color: #666; } + .skin-blue .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; + border-left-color: #fff; } + .skin-blue .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; + color: #999; + border-top-left-radius: 0; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 0; } + .skin-blue.layout-top-nav .main-header > .logo { - background-color: #3c8dbc; - color: #ffffff; - border-bottom: 0 solid transparent; + background-color: #3c8dbc; + color: #ffffff; + border-bottom: 0 solid transparent; } + .skin-blue.layout-top-nav .main-header > .logo:hover { - background-color: #3b8ab8; + background-color: #3b8ab8; } + /* * Skin: Blue * ---------- */ .skin-blue-light .main-header .navbar { - background-color: #3c8dbc; + background-color: #3c8dbc; } + .skin-blue-light .main-header .navbar .nav > li > a { - color: #ffffff; + color: #ffffff; } + .skin-blue-light .main-header .navbar .nav > li > a:hover, .skin-blue-light .main-header .navbar .nav > li > a:active, .skin-blue-light .main-header .navbar .nav > li > a:focus, @@ -154,175 +188,217 @@ .skin-blue-light .main-header .navbar .nav .open > a:hover, .skin-blue-light .main-header .navbar .nav .open > a:focus, .skin-blue-light .main-header .navbar .nav > .active > a { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; } + .skin-blue-light .main-header .navbar .sidebar-toggle { - color: #ffffff; + color: #ffffff; } + .skin-blue-light .main-header .navbar .sidebar-toggle:hover { - color: #f6f6f6; - background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); } + .skin-blue-light .main-header .navbar .sidebar-toggle { - color: #fff; + color: #fff; } + .skin-blue-light .main-header .navbar .sidebar-toggle:hover { - background-color: #367fa9; + background-color: #367fa9; } + @media (max-width: 767px) { - .skin-blue-light .main-header .navbar .dropdown-menu li.divider { - background-color: rgba(255, 255, 255, 0.1); - } - .skin-blue-light .main-header .navbar .dropdown-menu li a { - color: #fff; - } - .skin-blue-light .main-header .navbar .dropdown-menu li a:hover { - background: #367fa9; - } -} + .skin-blue-light .main-header .navbar .dropdown-menu li.divider { + background-color: rgba(255, 255, 255, 0.1); + } + + .skin-blue-light .main-header .navbar .dropdown-menu li a { + color: #fff; + } + + .skin-blue-light .main-header .navbar .dropdown-menu li a:hover { + background: #367fa9; + } +} + .skin-blue-light .main-header .logo { - background-color: #3c8dbc; - color: #ffffff; - border-bottom: 0 solid transparent; + background-color: #3c8dbc; + color: #ffffff; + border-bottom: 0 solid transparent; } + .skin-blue-light .main-header .logo:hover { - background-color: #3b8ab8; + background-color: #3b8ab8; } + .skin-blue-light .main-header li.user-header { - background-color: #3c8dbc; + background-color: #3c8dbc; } + .skin-blue-light .content-header { - background: transparent; + background: transparent; } + .skin-blue-light .wrapper, .skin-blue-light .main-sidebar, .skin-blue-light .left-side { - background-color: #f9fafc; + background-color: #f9fafc; } + .skin-blue-light .content-wrapper, .skin-blue-light .main-footer { - border-left: 1px solid #d2d6de; + border-left: 1px solid #d2d6de; } + .skin-blue-light .user-panel > .info, .skin-blue-light .user-panel > .info > a { - color: #444444; + color: #444444; } + .skin-blue-light .sidebar-menu > li { - -webkit-transition: border-left-color 0.3s ease; - -o-transition: border-left-color 0.3s ease; - transition: border-left-color 0.3s ease; + -webkit-transition: border-left-color 0.3s ease; + -o-transition: border-left-color 0.3s ease; + transition: border-left-color 0.3s ease; } + .skin-blue-light .sidebar-menu > li.header { - color: #848484; - background: #f9fafc; + color: #848484; + background: #f9fafc; } + .skin-blue-light .sidebar-menu > li > a { - border-left: 3px solid transparent; - font-weight: 600; + border-left: 3px solid transparent; + font-weight: 600; } + .skin-blue-light .sidebar-menu > li:hover > a, .skin-blue-light .sidebar-menu > li.active > a { - color: #000000; - background: #f4f4f5; + color: #000000; + background: #f4f4f5; } + .skin-blue-light .sidebar-menu > li.active { - border-left-color: #3c8dbc; + border-left-color: #3c8dbc; } + .skin-blue-light .sidebar-menu > li.active > a { - font-weight: 600; + font-weight: 600; } + .skin-blue-light .sidebar-menu > li > .treeview-menu { - background: #f4f4f5; + background: #f4f4f5; } + .skin-blue-light .sidebar a { - color: #444444; + color: #444444; } + .skin-blue-light .sidebar a:hover { - text-decoration: none; + text-decoration: none; } + .skin-blue-light .treeview-menu > li > a { - color: #777777; + color: #777777; } + .skin-blue-light .treeview-menu > li.active > a, .skin-blue-light .treeview-menu > li > a:hover { - color: #000000; + color: #000000; } + .skin-blue-light .treeview-menu > li.active > a { - font-weight: 600; + font-weight: 600; } + .skin-blue-light .sidebar-form { - border-radius: 3px; - border: 1px solid #d2d6de; - margin: 10px 10px; + border-radius: 3px; + border: 1px solid #d2d6de; + margin: 10px 10px; } + .skin-blue-light .sidebar-form input[type="text"], .skin-blue-light .sidebar-form .btn { - box-shadow: none; - background-color: #fff; - border: 1px solid transparent; - height: 35px; + box-shadow: none; + background-color: #fff; + border: 1px solid transparent; + height: 35px; } + .skin-blue-light .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; + color: #666; + border-top-left-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 2px; } + .skin-blue-light .sidebar-form input[type="text"]:focus, .skin-blue-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; + background-color: #fff; + color: #666; } + .skin-blue-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; + border-left-color: #fff; } + .skin-blue-light .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; + color: #999; + border-top-left-radius: 0; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 0; } + @media (min-width: 768px) { - .skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu { - border-left: 1px solid #d2d6de; - } + .skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu { + border-left: 1px solid #d2d6de; + } } + .skin-blue-light .main-footer { - border-top-color: #d2d6de; + border-top-color: #d2d6de; } + .skin-blue.layout-top-nav .main-header > .logo { - background-color: #3c8dbc; - color: #ffffff; - border-bottom: 0 solid transparent; + background-color: #3c8dbc; + color: #ffffff; + border-bottom: 0 solid transparent; } + .skin-blue.layout-top-nav .main-header > .logo:hover { - background-color: #3b8ab8; + background-color: #3b8ab8; } + /* * Skin: Black * ----------- */ /* skin-black navbar */ .skin-black .main-header { - -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05); + -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05); } + .skin-black .main-header .navbar-toggle { - color: #333; + color: #333; } + .skin-black .main-header .navbar-brand { - color: #333; - border-right: 1px solid #eee; + color: #333; + border-right: 1px solid #eee; } + .skin-black .main-header .navbar { - background-color: #ffffff; + background-color: #ffffff; } + .skin-black .main-header .navbar .nav > li > a { - color: #333333; + color: #333333; } + .skin-black .main-header .navbar .nav > li > a:hover, .skin-black .main-header .navbar .nav > li > a:active, .skin-black .main-header .navbar .nav > li > a:focus, @@ -330,157 +406,192 @@ .skin-black .main-header .navbar .nav .open > a:hover, .skin-black .main-header .navbar .nav .open > a:focus, .skin-black .main-header .navbar .nav > .active > a { - background: #ffffff; - color: #999999; + background: #ffffff; + color: #999999; } + .skin-black .main-header .navbar .sidebar-toggle { - color: #333333; + color: #333333; } + .skin-black .main-header .navbar .sidebar-toggle:hover { - color: #999999; - background: #ffffff; + color: #999999; + background: #ffffff; } + .skin-black .main-header .navbar > .sidebar-toggle { - color: #333; - border-right: 1px solid #eee; + color: #333; + border-right: 1px solid #eee; } + .skin-black .main-header .navbar .navbar-nav > li > a { - border-right: 1px solid #eee; + border-right: 1px solid #eee; } + .skin-black .main-header .navbar .navbar-custom-menu .navbar-nav > li > a, .skin-black .main-header .navbar .navbar-right > li > a { - border-left: 1px solid #eee; - border-right-width: 0; + border-left: 1px solid #eee; + border-right-width: 0; } + .skin-black .main-header > .logo { - background-color: #ffffff; - color: #333333; - border-bottom: 0 solid transparent; - border-right: 1px solid #eee; + background-color: #ffffff; + color: #333333; + border-bottom: 0 solid transparent; + border-right: 1px solid #eee; } + .skin-black .main-header > .logo:hover { - background-color: #fcfcfc; + background-color: #fcfcfc; } + @media (max-width: 767px) { - .skin-black .main-header > .logo { - background-color: #222222; - color: #ffffff; - border-bottom: 0 solid transparent; - border-right: none; - } - .skin-black .main-header > .logo:hover { - background-color: #1f1f1f; - } -} + .skin-black .main-header > .logo { + background-color: #222222; + color: #ffffff; + border-bottom: 0 solid transparent; + border-right: none; + } + + .skin-black .main-header > .logo:hover { + background-color: #1f1f1f; + } +} + .skin-black .main-header li.user-header { - background-color: #222; + background-color: #222; } + .skin-black .content-header { - background: transparent; - box-shadow: none; + background: transparent; + box-shadow: none; } + .skin-black .wrapper, .skin-black .main-sidebar, .skin-black .left-side { - background-color: #222d32; + background-color: #222d32; } + .skin-black .user-panel > .info, .skin-black .user-panel > .info > a { - color: #fff; + color: #fff; } + .skin-black .sidebar-menu > li.header { - color: #4b646f; - background: #1a2226; + color: #4b646f; + background: #1a2226; } + .skin-black .sidebar-menu > li > a { - border-left: 3px solid transparent; + border-left: 3px solid transparent; } + .skin-black .sidebar-menu > li:hover > a, .skin-black .sidebar-menu > li.active > a { - color: #ffffff; - background: #1e282c; - border-left-color: #ffffff; + color: #ffffff; + background: #1e282c; + border-left-color: #ffffff; } + .skin-black .sidebar-menu > li > .treeview-menu { - margin: 0 1px; - background: #2c3b41; + margin: 0 1px; + background: #2c3b41; } + .skin-black .sidebar a { - color: #b8c7ce; + color: #b8c7ce; } + .skin-black .sidebar a:hover { - text-decoration: none; + text-decoration: none; } + .skin-black .treeview-menu > li > a { - color: #8aa4af; + color: #8aa4af; } + .skin-black .treeview-menu > li.active > a, .skin-black .treeview-menu > li > a:hover { - color: #ffffff; + color: #ffffff; } + .skin-black .sidebar-form { - border-radius: 3px; - border: 1px solid #374850; - margin: 10px 10px; + border-radius: 3px; + border: 1px solid #374850; + margin: 10px 10px; } + .skin-black .sidebar-form input[type="text"], .skin-black .sidebar-form .btn { - box-shadow: none; - background-color: #374850; - border: 1px solid transparent; - height: 35px; + box-shadow: none; + background-color: #374850; + border: 1px solid transparent; + height: 35px; } + .skin-black .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; + color: #666; + border-top-left-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 2px; } + .skin-black .sidebar-form input[type="text"]:focus, .skin-black .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; + background-color: #fff; + color: #666; } + .skin-black .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; + border-left-color: #fff; } + .skin-black .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; + color: #999; + border-top-left-radius: 0; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 0; } + .skin-black .pace .pace-progress { - background: #222; + background: #222; } + .skin-black .pace .pace-activity { - border-top-color: #222; - border-left-color: #222; + border-top-color: #222; + border-left-color: #222; } + /* * Skin: Black * ----------- */ /* skin-black navbar */ .skin-black-light .main-header { - -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05); + -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05); } + .skin-black-light .main-header .navbar-toggle { - color: #333; + color: #333; } + .skin-black-light .main-header .navbar-brand { - color: #333; - border-right: 1px solid #eee; + color: #333; + border-right: 1px solid #eee; } + .skin-black-light .main-header .navbar { - background-color: #ffffff; + background-color: #ffffff; } + .skin-black-light .main-header .navbar .nav > li > a { - color: #333333; + color: #333333; } + .skin-black-light .main-header .navbar .nav > li > a:hover, .skin-black-light .main-header .navbar .nav > li > a:active, .skin-black-light .main-header .navbar .nav > li > a:focus, @@ -488,160 +599,196 @@ .skin-black-light .main-header .navbar .nav .open > a:hover, .skin-black-light .main-header .navbar .nav .open > a:focus, .skin-black-light .main-header .navbar .nav > .active > a { - background: #ffffff; - color: #999999; + background: #ffffff; + color: #999999; } + .skin-black-light .main-header .navbar .sidebar-toggle { - color: #333333; + color: #333333; } + .skin-black-light .main-header .navbar .sidebar-toggle:hover { - color: #999999; - background: #ffffff; + color: #999999; + background: #ffffff; } + .skin-black-light .main-header .navbar > .sidebar-toggle { - color: #333; - border-right: 1px solid #eee; + color: #333; + border-right: 1px solid #eee; } + .skin-black-light .main-header .navbar .navbar-nav > li > a { - border-right: 1px solid #eee; + border-right: 1px solid #eee; } + .skin-black-light .main-header .navbar .navbar-custom-menu .navbar-nav > li > a, .skin-black-light .main-header .navbar .navbar-right > li > a { - border-left: 1px solid #eee; - border-right-width: 0; + border-left: 1px solid #eee; + border-right-width: 0; } + .skin-black-light .main-header > .logo { - background-color: #ffffff; - color: #333333; - border-bottom: 0 solid transparent; - border-right: 1px solid #eee; + background-color: #ffffff; + color: #333333; + border-bottom: 0 solid transparent; + border-right: 1px solid #eee; } + .skin-black-light .main-header > .logo:hover { - background-color: #fcfcfc; + background-color: #fcfcfc; } + @media (max-width: 767px) { - .skin-black-light .main-header > .logo { - background-color: #222222; - color: #ffffff; - border-bottom: 0 solid transparent; - border-right: none; - } - .skin-black-light .main-header > .logo:hover { - background-color: #1f1f1f; - } -} + .skin-black-light .main-header > .logo { + background-color: #222222; + color: #ffffff; + border-bottom: 0 solid transparent; + border-right: none; + } + + .skin-black-light .main-header > .logo:hover { + background-color: #1f1f1f; + } +} + .skin-black-light .main-header li.user-header { - background-color: #222; + background-color: #222; } + .skin-black-light .content-header { - background: transparent; - box-shadow: none; + background: transparent; + box-shadow: none; } + .skin-black-light .wrapper, .skin-black-light .main-sidebar, .skin-black-light .left-side { - background-color: #f9fafc; + background-color: #f9fafc; } + .skin-black-light .content-wrapper, .skin-black-light .main-footer { - border-left: 1px solid #d2d6de; + border-left: 1px solid #d2d6de; } + .skin-black-light .user-panel > .info, .skin-black-light .user-panel > .info > a { - color: #444444; + color: #444444; } + .skin-black-light .sidebar-menu > li { - -webkit-transition: border-left-color 0.3s ease; - -o-transition: border-left-color 0.3s ease; - transition: border-left-color 0.3s ease; + -webkit-transition: border-left-color 0.3s ease; + -o-transition: border-left-color 0.3s ease; + transition: border-left-color 0.3s ease; } + .skin-black-light .sidebar-menu > li.header { - color: #848484; - background: #f9fafc; + color: #848484; + background: #f9fafc; } + .skin-black-light .sidebar-menu > li > a { - border-left: 3px solid transparent; - font-weight: 600; + border-left: 3px solid transparent; + font-weight: 600; } + .skin-black-light .sidebar-menu > li:hover > a, .skin-black-light .sidebar-menu > li.active > a { - color: #000000; - background: #f4f4f5; + color: #000000; + background: #f4f4f5; } + .skin-black-light .sidebar-menu > li.active { - border-left-color: #ffffff; + border-left-color: #ffffff; } + .skin-black-light .sidebar-menu > li.active > a { - font-weight: 600; + font-weight: 600; } + .skin-black-light .sidebar-menu > li > .treeview-menu { - background: #f4f4f5; + background: #f4f4f5; } + .skin-black-light .sidebar a { - color: #444444; + color: #444444; } + .skin-black-light .sidebar a:hover { - text-decoration: none; + text-decoration: none; } + .skin-black-light .treeview-menu > li > a { - color: #777777; + color: #777777; } + .skin-black-light .treeview-menu > li.active > a, .skin-black-light .treeview-menu > li > a:hover { - color: #000000; + color: #000000; } + .skin-black-light .treeview-menu > li.active > a { - font-weight: 600; + font-weight: 600; } + .skin-black-light .sidebar-form { - border-radius: 3px; - border: 1px solid #d2d6de; - margin: 10px 10px; + border-radius: 3px; + border: 1px solid #d2d6de; + margin: 10px 10px; } + .skin-black-light .sidebar-form input[type="text"], .skin-black-light .sidebar-form .btn { - box-shadow: none; - background-color: #fff; - border: 1px solid transparent; - height: 35px; + box-shadow: none; + background-color: #fff; + border: 1px solid transparent; + height: 35px; } + .skin-black-light .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; + color: #666; + border-top-left-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 2px; } + .skin-black-light .sidebar-form input[type="text"]:focus, .skin-black-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; + background-color: #fff; + color: #666; } + .skin-black-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; + border-left-color: #fff; } + .skin-black-light .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; + color: #999; + border-top-left-radius: 0; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 0; } + @media (min-width: 768px) { - .skin-black-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu { - border-left: 1px solid #d2d6de; - } + .skin-black-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu { + border-left: 1px solid #d2d6de; + } } + /* * Skin: Green * ----------- */ .skin-green .main-header .navbar { - background-color: #00a65a; + background-color: #00a65a; } + .skin-green .main-header .navbar .nav > li > a { - color: #ffffff; + color: #ffffff; } + .skin-green .main-header .navbar .nav > li > a:hover, .skin-green .main-header .navbar .nav > li > a:active, .skin-green .main-header .navbar .nav > li > a:focus, @@ -649,130 +796,160 @@ .skin-green .main-header .navbar .nav .open > a:hover, .skin-green .main-header .navbar .nav .open > a:focus, .skin-green .main-header .navbar .nav > .active > a { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; } + .skin-green .main-header .navbar .sidebar-toggle { - color: #ffffff; + color: #ffffff; } + .skin-green .main-header .navbar .sidebar-toggle:hover { - color: #f6f6f6; - background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); } + .skin-green .main-header .navbar .sidebar-toggle { - color: #fff; + color: #fff; } + .skin-green .main-header .navbar .sidebar-toggle:hover { - background-color: #008d4c; + background-color: #008d4c; } + @media (max-width: 767px) { - .skin-green .main-header .navbar .dropdown-menu li.divider { - background-color: rgba(255, 255, 255, 0.1); - } - .skin-green .main-header .navbar .dropdown-menu li a { - color: #fff; - } - .skin-green .main-header .navbar .dropdown-menu li a:hover { - background: #008d4c; - } -} + .skin-green .main-header .navbar .dropdown-menu li.divider { + background-color: rgba(255, 255, 255, 0.1); + } + + .skin-green .main-header .navbar .dropdown-menu li a { + color: #fff; + } + + .skin-green .main-header .navbar .dropdown-menu li a:hover { + background: #008d4c; + } +} + .skin-green .main-header .logo { - background-color: #008d4c; - color: #ffffff; - border-bottom: 0 solid transparent; + background-color: #008d4c; + color: #ffffff; + border-bottom: 0 solid transparent; } + .skin-green .main-header .logo:hover { - background-color: #008749; + background-color: #008749; } + .skin-green .main-header li.user-header { - background-color: #00a65a; + background-color: #00a65a; } + .skin-green .content-header { - background: transparent; + background: transparent; } + .skin-green .wrapper, .skin-green .main-sidebar, .skin-green .left-side { - background-color: #222d32; + background-color: #222d32; } + .skin-green .user-panel > .info, .skin-green .user-panel > .info > a { - color: #fff; + color: #fff; } + .skin-green .sidebar-menu > li.header { - color: #4b646f; - background: #1a2226; + color: #4b646f; + background: #1a2226; } + .skin-green .sidebar-menu > li > a { - border-left: 3px solid transparent; + border-left: 3px solid transparent; } + .skin-green .sidebar-menu > li:hover > a, .skin-green .sidebar-menu > li.active > a { - color: #ffffff; - background: #1e282c; - border-left-color: #00a65a; + color: #ffffff; + background: #1e282c; + border-left-color: #00a65a; } + .skin-green .sidebar-menu > li > .treeview-menu { - margin: 0 1px; - background: #2c3b41; + margin: 0 1px; + background: #2c3b41; } + .skin-green .sidebar a { - color: #b8c7ce; + color: #b8c7ce; } + .skin-green .sidebar a:hover { - text-decoration: none; + text-decoration: none; } + .skin-green .treeview-menu > li > a { - color: #8aa4af; + color: #8aa4af; } + .skin-green .treeview-menu > li.active > a, .skin-green .treeview-menu > li > a:hover { - color: #ffffff; + color: #ffffff; } + .skin-green .sidebar-form { - border-radius: 3px; - border: 1px solid #374850; - margin: 10px 10px; + border-radius: 3px; + border: 1px solid #374850; + margin: 10px 10px; } + .skin-green .sidebar-form input[type="text"], .skin-green .sidebar-form .btn { - box-shadow: none; - background-color: #374850; - border: 1px solid transparent; - height: 35px; + box-shadow: none; + background-color: #374850; + border: 1px solid transparent; + height: 35px; } + .skin-green .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; + color: #666; + border-top-left-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 2px; } + .skin-green .sidebar-form input[type="text"]:focus, .skin-green .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; + background-color: #fff; + color: #666; } + .skin-green .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; + border-left-color: #fff; } + .skin-green .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; + color: #999; + border-top-left-radius: 0; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 0; } + /* * Skin: Green * ----------- */ .skin-green-light .main-header .navbar { - background-color: #00a65a; + background-color: #00a65a; } + .skin-green-light .main-header .navbar .nav > li > a { - color: #ffffff; + color: #ffffff; } + .skin-green-light .main-header .navbar .nav > li > a:hover, .skin-green-light .main-header .navbar .nav > li > a:active, .skin-green-light .main-header .navbar .nav > li > a:focus, @@ -780,152 +957,188 @@ .skin-green-light .main-header .navbar .nav .open > a:hover, .skin-green-light .main-header .navbar .nav .open > a:focus, .skin-green-light .main-header .navbar .nav > .active > a { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; } + .skin-green-light .main-header .navbar .sidebar-toggle { - color: #ffffff; + color: #ffffff; } + .skin-green-light .main-header .navbar .sidebar-toggle:hover { - color: #f6f6f6; - background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); } + .skin-green-light .main-header .navbar .sidebar-toggle { - color: #fff; + color: #fff; } + .skin-green-light .main-header .navbar .sidebar-toggle:hover { - background-color: #008d4c; + background-color: #008d4c; } + @media (max-width: 767px) { - .skin-green-light .main-header .navbar .dropdown-menu li.divider { - background-color: rgba(255, 255, 255, 0.1); - } - .skin-green-light .main-header .navbar .dropdown-menu li a { - color: #fff; - } - .skin-green-light .main-header .navbar .dropdown-menu li a:hover { - background: #008d4c; - } -} + .skin-green-light .main-header .navbar .dropdown-menu li.divider { + background-color: rgba(255, 255, 255, 0.1); + } + + .skin-green-light .main-header .navbar .dropdown-menu li a { + color: #fff; + } + + .skin-green-light .main-header .navbar .dropdown-menu li a:hover { + background: #008d4c; + } +} + .skin-green-light .main-header .logo { - background-color: #00a65a; - color: #ffffff; - border-bottom: 0 solid transparent; + background-color: #00a65a; + color: #ffffff; + border-bottom: 0 solid transparent; } + .skin-green-light .main-header .logo:hover { - background-color: #00a157; + background-color: #00a157; } + .skin-green-light .main-header li.user-header { - background-color: #00a65a; + background-color: #00a65a; } + .skin-green-light .content-header { - background: transparent; + background: transparent; } + .skin-green-light .wrapper, .skin-green-light .main-sidebar, .skin-green-light .left-side { - background-color: #f9fafc; + background-color: #f9fafc; } + .skin-green-light .content-wrapper, .skin-green-light .main-footer { - border-left: 1px solid #d2d6de; + border-left: 1px solid #d2d6de; } + .skin-green-light .user-panel > .info, .skin-green-light .user-panel > .info > a { - color: #444444; + color: #444444; } + .skin-green-light .sidebar-menu > li { - -webkit-transition: border-left-color 0.3s ease; - -o-transition: border-left-color 0.3s ease; - transition: border-left-color 0.3s ease; + -webkit-transition: border-left-color 0.3s ease; + -o-transition: border-left-color 0.3s ease; + transition: border-left-color 0.3s ease; } + .skin-green-light .sidebar-menu > li.header { - color: #848484; - background: #f9fafc; + color: #848484; + background: #f9fafc; } + .skin-green-light .sidebar-menu > li > a { - border-left: 3px solid transparent; - font-weight: 600; + border-left: 3px solid transparent; + font-weight: 600; } + .skin-green-light .sidebar-menu > li:hover > a, .skin-green-light .sidebar-menu > li.active > a { - color: #000000; - background: #f4f4f5; + color: #000000; + background: #f4f4f5; } + .skin-green-light .sidebar-menu > li.active { - border-left-color: #00a65a; + border-left-color: #00a65a; } + .skin-green-light .sidebar-menu > li.active > a { - font-weight: 600; + font-weight: 600; } + .skin-green-light .sidebar-menu > li > .treeview-menu { - background: #f4f4f5; + background: #f4f4f5; } + .skin-green-light .sidebar a { - color: #444444; + color: #444444; } + .skin-green-light .sidebar a:hover { - text-decoration: none; + text-decoration: none; } + .skin-green-light .treeview-menu > li > a { - color: #777777; + color: #777777; } + .skin-green-light .treeview-menu > li.active > a, .skin-green-light .treeview-menu > li > a:hover { - color: #000000; + color: #000000; } + .skin-green-light .treeview-menu > li.active > a { - font-weight: 600; + font-weight: 600; } + .skin-green-light .sidebar-form { - border-radius: 3px; - border: 1px solid #d2d6de; - margin: 10px 10px; + border-radius: 3px; + border: 1px solid #d2d6de; + margin: 10px 10px; } + .skin-green-light .sidebar-form input[type="text"], .skin-green-light .sidebar-form .btn { - box-shadow: none; - background-color: #fff; - border: 1px solid transparent; - height: 35px; + box-shadow: none; + background-color: #fff; + border: 1px solid transparent; + height: 35px; } + .skin-green-light .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; + color: #666; + border-top-left-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 2px; } + .skin-green-light .sidebar-form input[type="text"]:focus, .skin-green-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; + background-color: #fff; + color: #666; } + .skin-green-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; + border-left-color: #fff; } + .skin-green-light .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; + color: #999; + border-top-left-radius: 0; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 0; } + @media (min-width: 768px) { - .skin-green-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu { - border-left: 1px solid #d2d6de; - } + .skin-green-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu { + border-left: 1px solid #d2d6de; + } } + /* * Skin: Red * --------- */ .skin-red .main-header .navbar { - background-color: #dd4b39; + background-color: #dd4b39; } + .skin-red .main-header .navbar .nav > li > a { - color: #ffffff; + color: #ffffff; } + .skin-red .main-header .navbar .nav > li > a:hover, .skin-red .main-header .navbar .nav > li > a:active, .skin-red .main-header .navbar .nav > li > a:focus, @@ -933,130 +1146,160 @@ .skin-red .main-header .navbar .nav .open > a:hover, .skin-red .main-header .navbar .nav .open > a:focus, .skin-red .main-header .navbar .nav > .active > a { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; } + .skin-red .main-header .navbar .sidebar-toggle { - color: #ffffff; + color: #ffffff; } + .skin-red .main-header .navbar .sidebar-toggle:hover { - color: #f6f6f6; - background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); } + .skin-red .main-header .navbar .sidebar-toggle { - color: #fff; + color: #fff; } + .skin-red .main-header .navbar .sidebar-toggle:hover { - background-color: #d73925; + background-color: #d73925; } + @media (max-width: 767px) { - .skin-red .main-header .navbar .dropdown-menu li.divider { - background-color: rgba(255, 255, 255, 0.1); - } - .skin-red .main-header .navbar .dropdown-menu li a { - color: #fff; - } - .skin-red .main-header .navbar .dropdown-menu li a:hover { - background: #d73925; - } -} + .skin-red .main-header .navbar .dropdown-menu li.divider { + background-color: rgba(255, 255, 255, 0.1); + } + + .skin-red .main-header .navbar .dropdown-menu li a { + color: #fff; + } + + .skin-red .main-header .navbar .dropdown-menu li a:hover { + background: #d73925; + } +} + .skin-red .main-header .logo { - background-color: #d73925; - color: #ffffff; - border-bottom: 0 solid transparent; + background-color: #d73925; + color: #ffffff; + border-bottom: 0 solid transparent; } + .skin-red .main-header .logo:hover { - background-color: #d33724; + background-color: #d33724; } + .skin-red .main-header li.user-header { - background-color: #dd4b39; + background-color: #dd4b39; } + .skin-red .content-header { - background: transparent; + background: transparent; } + .skin-red .wrapper, .skin-red .main-sidebar, .skin-red .left-side { - background-color: #222d32; + background-color: #222d32; } + .skin-red .user-panel > .info, .skin-red .user-panel > .info > a { - color: #fff; + color: #fff; } + .skin-red .sidebar-menu > li.header { - color: #4b646f; - background: #1a2226; + color: #4b646f; + background: #1a2226; } + .skin-red .sidebar-menu > li > a { - border-left: 3px solid transparent; + border-left: 3px solid transparent; } + .skin-red .sidebar-menu > li:hover > a, .skin-red .sidebar-menu > li.active > a { - color: #ffffff; - background: #1e282c; - border-left-color: #dd4b39; + color: #ffffff; + background: #1e282c; + border-left-color: #dd4b39; } + .skin-red .sidebar-menu > li > .treeview-menu { - margin: 0 1px; - background: #2c3b41; + margin: 0 1px; + background: #2c3b41; } + .skin-red .sidebar a { - color: #b8c7ce; + color: #b8c7ce; } + .skin-red .sidebar a:hover { - text-decoration: none; + text-decoration: none; } + .skin-red .treeview-menu > li > a { - color: #8aa4af; + color: #8aa4af; } + .skin-red .treeview-menu > li.active > a, .skin-red .treeview-menu > li > a:hover { - color: #ffffff; + color: #ffffff; } + .skin-red .sidebar-form { - border-radius: 3px; - border: 1px solid #374850; - margin: 10px 10px; + border-radius: 3px; + border: 1px solid #374850; + margin: 10px 10px; } + .skin-red .sidebar-form input[type="text"], .skin-red .sidebar-form .btn { - box-shadow: none; - background-color: #374850; - border: 1px solid transparent; - height: 35px; + box-shadow: none; + background-color: #374850; + border: 1px solid transparent; + height: 35px; } + .skin-red .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; + color: #666; + border-top-left-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 2px; } + .skin-red .sidebar-form input[type="text"]:focus, .skin-red .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; + background-color: #fff; + color: #666; } + .skin-red .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; + border-left-color: #fff; } + .skin-red .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; + color: #999; + border-top-left-radius: 0; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 0; } + /* * Skin: Red * --------- */ .skin-red-light .main-header .navbar { - background-color: #dd4b39; + background-color: #dd4b39; } + .skin-red-light .main-header .navbar .nav > li > a { - color: #ffffff; + color: #ffffff; } + .skin-red-light .main-header .navbar .nav > li > a:hover, .skin-red-light .main-header .navbar .nav > li > a:active, .skin-red-light .main-header .navbar .nav > li > a:focus, @@ -1064,152 +1307,188 @@ .skin-red-light .main-header .navbar .nav .open > a:hover, .skin-red-light .main-header .navbar .nav .open > a:focus, .skin-red-light .main-header .navbar .nav > .active > a { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; } + .skin-red-light .main-header .navbar .sidebar-toggle { - color: #ffffff; + color: #ffffff; } + .skin-red-light .main-header .navbar .sidebar-toggle:hover { - color: #f6f6f6; - background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); } + .skin-red-light .main-header .navbar .sidebar-toggle { - color: #fff; + color: #fff; } + .skin-red-light .main-header .navbar .sidebar-toggle:hover { - background-color: #d73925; + background-color: #d73925; } + @media (max-width: 767px) { - .skin-red-light .main-header .navbar .dropdown-menu li.divider { - background-color: rgba(255, 255, 255, 0.1); - } - .skin-red-light .main-header .navbar .dropdown-menu li a { - color: #fff; - } - .skin-red-light .main-header .navbar .dropdown-menu li a:hover { - background: #d73925; - } -} + .skin-red-light .main-header .navbar .dropdown-menu li.divider { + background-color: rgba(255, 255, 255, 0.1); + } + + .skin-red-light .main-header .navbar .dropdown-menu li a { + color: #fff; + } + + .skin-red-light .main-header .navbar .dropdown-menu li a:hover { + background: #d73925; + } +} + .skin-red-light .main-header .logo { - background-color: #dd4b39; - color: #ffffff; - border-bottom: 0 solid transparent; + background-color: #dd4b39; + color: #ffffff; + border-bottom: 0 solid transparent; } + .skin-red-light .main-header .logo:hover { - background-color: #dc4735; + background-color: #dc4735; } + .skin-red-light .main-header li.user-header { - background-color: #dd4b39; + background-color: #dd4b39; } + .skin-red-light .content-header { - background: transparent; + background: transparent; } + .skin-red-light .wrapper, .skin-red-light .main-sidebar, .skin-red-light .left-side { - background-color: #f9fafc; + background-color: #f9fafc; } + .skin-red-light .content-wrapper, .skin-red-light .main-footer { - border-left: 1px solid #d2d6de; + border-left: 1px solid #d2d6de; } + .skin-red-light .user-panel > .info, .skin-red-light .user-panel > .info > a { - color: #444444; + color: #444444; } + .skin-red-light .sidebar-menu > li { - -webkit-transition: border-left-color 0.3s ease; - -o-transition: border-left-color 0.3s ease; - transition: border-left-color 0.3s ease; + -webkit-transition: border-left-color 0.3s ease; + -o-transition: border-left-color 0.3s ease; + transition: border-left-color 0.3s ease; } + .skin-red-light .sidebar-menu > li.header { - color: #848484; - background: #f9fafc; + color: #848484; + background: #f9fafc; } + .skin-red-light .sidebar-menu > li > a { - border-left: 3px solid transparent; - font-weight: 600; + border-left: 3px solid transparent; + font-weight: 600; } + .skin-red-light .sidebar-menu > li:hover > a, .skin-red-light .sidebar-menu > li.active > a { - color: #000000; - background: #f4f4f5; + color: #000000; + background: #f4f4f5; } + .skin-red-light .sidebar-menu > li.active { - border-left-color: #dd4b39; + border-left-color: #dd4b39; } + .skin-red-light .sidebar-menu > li.active > a { - font-weight: 600; + font-weight: 600; } + .skin-red-light .sidebar-menu > li > .treeview-menu { - background: #f4f4f5; + background: #f4f4f5; } + .skin-red-light .sidebar a { - color: #444444; + color: #444444; } + .skin-red-light .sidebar a:hover { - text-decoration: none; + text-decoration: none; } + .skin-red-light .treeview-menu > li > a { - color: #777777; + color: #777777; } + .skin-red-light .treeview-menu > li.active > a, .skin-red-light .treeview-menu > li > a:hover { - color: #000000; + color: #000000; } + .skin-red-light .treeview-menu > li.active > a { - font-weight: 600; + font-weight: 600; } + .skin-red-light .sidebar-form { - border-radius: 3px; - border: 1px solid #d2d6de; - margin: 10px 10px; + border-radius: 3px; + border: 1px solid #d2d6de; + margin: 10px 10px; } + .skin-red-light .sidebar-form input[type="text"], .skin-red-light .sidebar-form .btn { - box-shadow: none; - background-color: #fff; - border: 1px solid transparent; - height: 35px; + box-shadow: none; + background-color: #fff; + border: 1px solid transparent; + height: 35px; } + .skin-red-light .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; + color: #666; + border-top-left-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 2px; } + .skin-red-light .sidebar-form input[type="text"]:focus, .skin-red-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; + background-color: #fff; + color: #666; } + .skin-red-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; + border-left-color: #fff; } + .skin-red-light .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; + color: #999; + border-top-left-radius: 0; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 0; } + @media (min-width: 768px) { - .skin-red-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu { - border-left: 1px solid #d2d6de; - } + .skin-red-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu { + border-left: 1px solid #d2d6de; + } } + /* * Skin: Yellow * ------------ */ .skin-yellow .main-header .navbar { - background-color: #f39c12; + background-color: #f39c12; } + .skin-yellow .main-header .navbar .nav > li > a { - color: #ffffff; + color: #ffffff; } + .skin-yellow .main-header .navbar .nav > li > a:hover, .skin-yellow .main-header .navbar .nav > li > a:active, .skin-yellow .main-header .navbar .nav > li > a:focus, @@ -1217,130 +1496,160 @@ .skin-yellow .main-header .navbar .nav .open > a:hover, .skin-yellow .main-header .navbar .nav .open > a:focus, .skin-yellow .main-header .navbar .nav > .active > a { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; } + .skin-yellow .main-header .navbar .sidebar-toggle { - color: #ffffff; + color: #ffffff; } + .skin-yellow .main-header .navbar .sidebar-toggle:hover { - color: #f6f6f6; - background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); } + .skin-yellow .main-header .navbar .sidebar-toggle { - color: #fff; + color: #fff; } + .skin-yellow .main-header .navbar .sidebar-toggle:hover { - background-color: #e08e0b; + background-color: #e08e0b; } + @media (max-width: 767px) { - .skin-yellow .main-header .navbar .dropdown-menu li.divider { - background-color: rgba(255, 255, 255, 0.1); - } - .skin-yellow .main-header .navbar .dropdown-menu li a { - color: #fff; - } - .skin-yellow .main-header .navbar .dropdown-menu li a:hover { - background: #e08e0b; - } -} + .skin-yellow .main-header .navbar .dropdown-menu li.divider { + background-color: rgba(255, 255, 255, 0.1); + } + + .skin-yellow .main-header .navbar .dropdown-menu li a { + color: #fff; + } + + .skin-yellow .main-header .navbar .dropdown-menu li a:hover { + background: #e08e0b; + } +} + .skin-yellow .main-header .logo { - background-color: #e08e0b; - color: #ffffff; - border-bottom: 0 solid transparent; + background-color: #e08e0b; + color: #ffffff; + border-bottom: 0 solid transparent; } + .skin-yellow .main-header .logo:hover { - background-color: #db8b0b; + background-color: #db8b0b; } + .skin-yellow .main-header li.user-header { - background-color: #f39c12; + background-color: #f39c12; } + .skin-yellow .content-header { - background: transparent; + background: transparent; } + .skin-yellow .wrapper, .skin-yellow .main-sidebar, .skin-yellow .left-side { - background-color: #222d32; + background-color: #222d32; } + .skin-yellow .user-panel > .info, .skin-yellow .user-panel > .info > a { - color: #fff; + color: #fff; } + .skin-yellow .sidebar-menu > li.header { - color: #4b646f; - background: #1a2226; + color: #4b646f; + background: #1a2226; } + .skin-yellow .sidebar-menu > li > a { - border-left: 3px solid transparent; + border-left: 3px solid transparent; } + .skin-yellow .sidebar-menu > li:hover > a, .skin-yellow .sidebar-menu > li.active > a { - color: #ffffff; - background: #1e282c; - border-left-color: #f39c12; + color: #ffffff; + background: #1e282c; + border-left-color: #f39c12; } + .skin-yellow .sidebar-menu > li > .treeview-menu { - margin: 0 1px; - background: #2c3b41; + margin: 0 1px; + background: #2c3b41; } + .skin-yellow .sidebar a { - color: #b8c7ce; + color: #b8c7ce; } + .skin-yellow .sidebar a:hover { - text-decoration: none; + text-decoration: none; } + .skin-yellow .treeview-menu > li > a { - color: #8aa4af; + color: #8aa4af; } + .skin-yellow .treeview-menu > li.active > a, .skin-yellow .treeview-menu > li > a:hover { - color: #ffffff; + color: #ffffff; } + .skin-yellow .sidebar-form { - border-radius: 3px; - border: 1px solid #374850; - margin: 10px 10px; + border-radius: 3px; + border: 1px solid #374850; + margin: 10px 10px; } + .skin-yellow .sidebar-form input[type="text"], .skin-yellow .sidebar-form .btn { - box-shadow: none; - background-color: #374850; - border: 1px solid transparent; - height: 35px; + box-shadow: none; + background-color: #374850; + border: 1px solid transparent; + height: 35px; } + .skin-yellow .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; + color: #666; + border-top-left-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 2px; } + .skin-yellow .sidebar-form input[type="text"]:focus, .skin-yellow .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; + background-color: #fff; + color: #666; } + .skin-yellow .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; + border-left-color: #fff; } + .skin-yellow .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; + color: #999; + border-top-left-radius: 0; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 0; } + /* * Skin: Yellow * ------------ */ .skin-yellow-light .main-header .navbar { - background-color: #f39c12; + background-color: #f39c12; } + .skin-yellow-light .main-header .navbar .nav > li > a { - color: #ffffff; + color: #ffffff; } + .skin-yellow-light .main-header .navbar .nav > li > a:hover, .skin-yellow-light .main-header .navbar .nav > li > a:active, .skin-yellow-light .main-header .navbar .nav > li > a:focus, @@ -1348,152 +1657,188 @@ .skin-yellow-light .main-header .navbar .nav .open > a:hover, .skin-yellow-light .main-header .navbar .nav .open > a:focus, .skin-yellow-light .main-header .navbar .nav > .active > a { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; } + .skin-yellow-light .main-header .navbar .sidebar-toggle { - color: #ffffff; + color: #ffffff; } + .skin-yellow-light .main-header .navbar .sidebar-toggle:hover { - color: #f6f6f6; - background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); } + .skin-yellow-light .main-header .navbar .sidebar-toggle { - color: #fff; + color: #fff; } + .skin-yellow-light .main-header .navbar .sidebar-toggle:hover { - background-color: #e08e0b; + background-color: #e08e0b; } + @media (max-width: 767px) { - .skin-yellow-light .main-header .navbar .dropdown-menu li.divider { - background-color: rgba(255, 255, 255, 0.1); - } - .skin-yellow-light .main-header .navbar .dropdown-menu li a { - color: #fff; - } - .skin-yellow-light .main-header .navbar .dropdown-menu li a:hover { - background: #e08e0b; - } -} + .skin-yellow-light .main-header .navbar .dropdown-menu li.divider { + background-color: rgba(255, 255, 255, 0.1); + } + + .skin-yellow-light .main-header .navbar .dropdown-menu li a { + color: #fff; + } + + .skin-yellow-light .main-header .navbar .dropdown-menu li a:hover { + background: #e08e0b; + } +} + .skin-yellow-light .main-header .logo { - background-color: #f39c12; - color: #ffffff; - border-bottom: 0 solid transparent; + background-color: #f39c12; + color: #ffffff; + border-bottom: 0 solid transparent; } + .skin-yellow-light .main-header .logo:hover { - background-color: #f39a0d; + background-color: #f39a0d; } + .skin-yellow-light .main-header li.user-header { - background-color: #f39c12; + background-color: #f39c12; } + .skin-yellow-light .content-header { - background: transparent; + background: transparent; } + .skin-yellow-light .wrapper, .skin-yellow-light .main-sidebar, .skin-yellow-light .left-side { - background-color: #f9fafc; + background-color: #f9fafc; } + .skin-yellow-light .content-wrapper, .skin-yellow-light .main-footer { - border-left: 1px solid #d2d6de; + border-left: 1px solid #d2d6de; } + .skin-yellow-light .user-panel > .info, .skin-yellow-light .user-panel > .info > a { - color: #444444; + color: #444444; } + .skin-yellow-light .sidebar-menu > li { - -webkit-transition: border-left-color 0.3s ease; - -o-transition: border-left-color 0.3s ease; - transition: border-left-color 0.3s ease; + -webkit-transition: border-left-color 0.3s ease; + -o-transition: border-left-color 0.3s ease; + transition: border-left-color 0.3s ease; } + .skin-yellow-light .sidebar-menu > li.header { - color: #848484; - background: #f9fafc; + color: #848484; + background: #f9fafc; } + .skin-yellow-light .sidebar-menu > li > a { - border-left: 3px solid transparent; - font-weight: 600; + border-left: 3px solid transparent; + font-weight: 600; } + .skin-yellow-light .sidebar-menu > li:hover > a, .skin-yellow-light .sidebar-menu > li.active > a { - color: #000000; - background: #f4f4f5; + color: #000000; + background: #f4f4f5; } + .skin-yellow-light .sidebar-menu > li.active { - border-left-color: #f39c12; + border-left-color: #f39c12; } + .skin-yellow-light .sidebar-menu > li.active > a { - font-weight: 600; + font-weight: 600; } + .skin-yellow-light .sidebar-menu > li > .treeview-menu { - background: #f4f4f5; + background: #f4f4f5; } + .skin-yellow-light .sidebar a { - color: #444444; + color: #444444; } + .skin-yellow-light .sidebar a:hover { - text-decoration: none; + text-decoration: none; } + .skin-yellow-light .treeview-menu > li > a { - color: #777777; + color: #777777; } + .skin-yellow-light .treeview-menu > li.active > a, .skin-yellow-light .treeview-menu > li > a:hover { - color: #000000; + color: #000000; } + .skin-yellow-light .treeview-menu > li.active > a { - font-weight: 600; + font-weight: 600; } + .skin-yellow-light .sidebar-form { - border-radius: 3px; - border: 1px solid #d2d6de; - margin: 10px 10px; + border-radius: 3px; + border: 1px solid #d2d6de; + margin: 10px 10px; } + .skin-yellow-light .sidebar-form input[type="text"], .skin-yellow-light .sidebar-form .btn { - box-shadow: none; - background-color: #fff; - border: 1px solid transparent; - height: 35px; + box-shadow: none; + background-color: #fff; + border: 1px solid transparent; + height: 35px; } + .skin-yellow-light .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; + color: #666; + border-top-left-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 2px; } + .skin-yellow-light .sidebar-form input[type="text"]:focus, .skin-yellow-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; + background-color: #fff; + color: #666; } + .skin-yellow-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; + border-left-color: #fff; } + .skin-yellow-light .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; + color: #999; + border-top-left-radius: 0; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 0; } + @media (min-width: 768px) { - .skin-yellow-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu { - border-left: 1px solid #d2d6de; - } + .skin-yellow-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu { + border-left: 1px solid #d2d6de; + } } + /* * Skin: Purple * ------------ */ .skin-purple .main-header .navbar { - background-color: #605ca8; + background-color: #605ca8; } + .skin-purple .main-header .navbar .nav > li > a { - color: #ffffff; + color: #ffffff; } + .skin-purple .main-header .navbar .nav > li > a:hover, .skin-purple .main-header .navbar .nav > li > a:active, .skin-purple .main-header .navbar .nav > li > a:focus, @@ -1501,130 +1846,160 @@ .skin-purple .main-header .navbar .nav .open > a:hover, .skin-purple .main-header .navbar .nav .open > a:focus, .skin-purple .main-header .navbar .nav > .active > a { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; } + .skin-purple .main-header .navbar .sidebar-toggle { - color: #ffffff; + color: #ffffff; } + .skin-purple .main-header .navbar .sidebar-toggle:hover { - color: #f6f6f6; - background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); } + .skin-purple .main-header .navbar .sidebar-toggle { - color: #fff; + color: #fff; } + .skin-purple .main-header .navbar .sidebar-toggle:hover { - background-color: #555299; + background-color: #555299; } + @media (max-width: 767px) { - .skin-purple .main-header .navbar .dropdown-menu li.divider { - background-color: rgba(255, 255, 255, 0.1); - } - .skin-purple .main-header .navbar .dropdown-menu li a { - color: #fff; - } - .skin-purple .main-header .navbar .dropdown-menu li a:hover { - background: #555299; - } -} + .skin-purple .main-header .navbar .dropdown-menu li.divider { + background-color: rgba(255, 255, 255, 0.1); + } + + .skin-purple .main-header .navbar .dropdown-menu li a { + color: #fff; + } + + .skin-purple .main-header .navbar .dropdown-menu li a:hover { + background: #555299; + } +} + .skin-purple .main-header .logo { - background-color: #555299; - color: #ffffff; - border-bottom: 0 solid transparent; + background-color: #555299; + color: #ffffff; + border-bottom: 0 solid transparent; } + .skin-purple .main-header .logo:hover { - background-color: #545096; + background-color: #545096; } + .skin-purple .main-header li.user-header { - background-color: #605ca8; + background-color: #605ca8; } + .skin-purple .content-header { - background: transparent; + background: transparent; } + .skin-purple .wrapper, .skin-purple .main-sidebar, .skin-purple .left-side { - background-color: #222d32; + background-color: #222d32; } + .skin-purple .user-panel > .info, .skin-purple .user-panel > .info > a { - color: #fff; + color: #fff; } + .skin-purple .sidebar-menu > li.header { - color: #4b646f; - background: #1a2226; + color: #4b646f; + background: #1a2226; } + .skin-purple .sidebar-menu > li > a { - border-left: 3px solid transparent; + border-left: 3px solid transparent; } + .skin-purple .sidebar-menu > li:hover > a, .skin-purple .sidebar-menu > li.active > a { - color: #ffffff; - background: #1e282c; - border-left-color: #605ca8; + color: #ffffff; + background: #1e282c; + border-left-color: #605ca8; } + .skin-purple .sidebar-menu > li > .treeview-menu { - margin: 0 1px; - background: #2c3b41; + margin: 0 1px; + background: #2c3b41; } + .skin-purple .sidebar a { - color: #b8c7ce; + color: #b8c7ce; } + .skin-purple .sidebar a:hover { - text-decoration: none; + text-decoration: none; } + .skin-purple .treeview-menu > li > a { - color: #8aa4af; + color: #8aa4af; } + .skin-purple .treeview-menu > li.active > a, .skin-purple .treeview-menu > li > a:hover { - color: #ffffff; + color: #ffffff; } + .skin-purple .sidebar-form { - border-radius: 3px; - border: 1px solid #374850; - margin: 10px 10px; + border-radius: 3px; + border: 1px solid #374850; + margin: 10px 10px; } + .skin-purple .sidebar-form input[type="text"], .skin-purple .sidebar-form .btn { - box-shadow: none; - background-color: #374850; - border: 1px solid transparent; - height: 35px; + box-shadow: none; + background-color: #374850; + border: 1px solid transparent; + height: 35px; } + .skin-purple .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; + color: #666; + border-top-left-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 2px; } + .skin-purple .sidebar-form input[type="text"]:focus, .skin-purple .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; + background-color: #fff; + color: #666; } + .skin-purple .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; + border-left-color: #fff; } + .skin-purple .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; + color: #999; + border-top-left-radius: 0; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 0; } + /* * Skin: Purple * ------------ */ .skin-purple-light .main-header .navbar { - background-color: #605ca8; + background-color: #605ca8; } + .skin-purple-light .main-header .navbar .nav > li > a { - color: #ffffff; + color: #ffffff; } + .skin-purple-light .main-header .navbar .nav > li > a:hover, .skin-purple-light .main-header .navbar .nav > li > a:active, .skin-purple-light .main-header .navbar .nav > li > a:focus, @@ -1632,139 +2007,172 @@ .skin-purple-light .main-header .navbar .nav .open > a:hover, .skin-purple-light .main-header .navbar .nav .open > a:focus, .skin-purple-light .main-header .navbar .nav > .active > a { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; } + .skin-purple-light .main-header .navbar .sidebar-toggle { - color: #ffffff; + color: #ffffff; } + .skin-purple-light .main-header .navbar .sidebar-toggle:hover { - color: #f6f6f6; - background: rgba(0, 0, 0, 0.1); + color: #f6f6f6; + background: rgba(0, 0, 0, 0.1); } + .skin-purple-light .main-header .navbar .sidebar-toggle { - color: #fff; + color: #fff; } + .skin-purple-light .main-header .navbar .sidebar-toggle:hover { - background-color: #555299; + background-color: #555299; } + @media (max-width: 767px) { - .skin-purple-light .main-header .navbar .dropdown-menu li.divider { - background-color: rgba(255, 255, 255, 0.1); - } - .skin-purple-light .main-header .navbar .dropdown-menu li a { - color: #fff; - } - .skin-purple-light .main-header .navbar .dropdown-menu li a:hover { - background: #555299; - } -} + .skin-purple-light .main-header .navbar .dropdown-menu li.divider { + background-color: rgba(255, 255, 255, 0.1); + } + + .skin-purple-light .main-header .navbar .dropdown-menu li a { + color: #fff; + } + + .skin-purple-light .main-header .navbar .dropdown-menu li a:hover { + background: #555299; + } +} + .skin-purple-light .main-header .logo { - background-color: #605ca8; - color: #ffffff; - border-bottom: 0 solid transparent; + background-color: #605ca8; + color: #ffffff; + border-bottom: 0 solid transparent; } + .skin-purple-light .main-header .logo:hover { - background-color: #5d59a6; + background-color: #5d59a6; } + .skin-purple-light .main-header li.user-header { - background-color: #605ca8; + background-color: #605ca8; } + .skin-purple-light .content-header { - background: transparent; + background: transparent; } + .skin-purple-light .wrapper, .skin-purple-light .main-sidebar, .skin-purple-light .left-side { - background-color: #f9fafc; + background-color: #f9fafc; } + .skin-purple-light .content-wrapper, .skin-purple-light .main-footer { - border-left: 1px solid #d2d6de; + border-left: 1px solid #d2d6de; } + .skin-purple-light .user-panel > .info, .skin-purple-light .user-panel > .info > a { - color: #444444; + color: #444444; } + .skin-purple-light .sidebar-menu > li { - -webkit-transition: border-left-color 0.3s ease; - -o-transition: border-left-color 0.3s ease; - transition: border-left-color 0.3s ease; + -webkit-transition: border-left-color 0.3s ease; + -o-transition: border-left-color 0.3s ease; + transition: border-left-color 0.3s ease; } + .skin-purple-light .sidebar-menu > li.header { - color: #848484; - background: #f9fafc; + color: #848484; + background: #f9fafc; } + .skin-purple-light .sidebar-menu > li > a { - border-left: 3px solid transparent; - font-weight: 600; + border-left: 3px solid transparent; + font-weight: 600; } + .skin-purple-light .sidebar-menu > li:hover > a, .skin-purple-light .sidebar-menu > li.active > a { - color: #000000; - background: #f4f4f5; + color: #000000; + background: #f4f4f5; } + .skin-purple-light .sidebar-menu > li.active { - border-left-color: #605ca8; + border-left-color: #605ca8; } + .skin-purple-light .sidebar-menu > li.active > a { - font-weight: 600; + font-weight: 600; } + .skin-purple-light .sidebar-menu > li > .treeview-menu { - background: #f4f4f5; + background: #f4f4f5; } + .skin-purple-light .sidebar a { - color: #444444; + color: #444444; } + .skin-purple-light .sidebar a:hover { - text-decoration: none; + text-decoration: none; } + .skin-purple-light .treeview-menu > li > a { - color: #777777; + color: #777777; } + .skin-purple-light .treeview-menu > li.active > a, .skin-purple-light .treeview-menu > li > a:hover { - color: #000000; + color: #000000; } + .skin-purple-light .treeview-menu > li.active > a { - font-weight: 600; + font-weight: 600; } + .skin-purple-light .sidebar-form { - border-radius: 3px; - border: 1px solid #d2d6de; - margin: 10px 10px; + border-radius: 3px; + border: 1px solid #d2d6de; + margin: 10px 10px; } + .skin-purple-light .sidebar-form input[type="text"], .skin-purple-light .sidebar-form .btn { - box-shadow: none; - background-color: #fff; - border: 1px solid transparent; - height: 35px; + box-shadow: none; + background-color: #fff; + border: 1px solid transparent; + height: 35px; } + .skin-purple-light .sidebar-form input[type="text"] { - color: #666; - border-top-left-radius: 2px; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 2px; + color: #666; + border-top-left-radius: 2px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 2px; } + .skin-purple-light .sidebar-form input[type="text"]:focus, .skin-purple-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; + background-color: #fff; + color: #666; } + .skin-purple-light .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; + border-left-color: #fff; } + .skin-purple-light .sidebar-form .btn { - color: #999; - border-top-left-radius: 0; - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; - border-bottom-left-radius: 0; + color: #999; + border-top-left-radius: 0; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + border-bottom-left-radius: 0; } + @media (min-width: 768px) { - .skin-purple-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu { - border-left: 1px solid #d2d6de; - } + .skin-purple-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu { + border-left: 1px solid #d2d6de; + } } diff --git a/main/app/sprinkles/core/assets/userfrosting/css/tablesorter-reflow.css b/main/app/sprinkles/core/assets/userfrosting/css/tablesorter-reflow.css index 3a9c14f..e944100 100644 --- a/main/app/sprinkles/core/assets/userfrosting/css/tablesorter-reflow.css +++ b/main/app/sprinkles/core/assets/userfrosting/css/tablesorter-reflow.css @@ -1,61 +1,65 @@ /* REQUIRED CSS: change your reflow breakpoint here (35em below) */ @media ( max-width: 35em ) { - /* uncomment out the line below if you don't want the sortable headers to show */ - table.ui-table-reflow thead { display: none; } - - .uf-table-search { - display: inherit; - } - - /* css for reflow & reflow2 widgets */ - .ui-table-reflow td, - .ui-table-reflow th { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - float: right; - /* if not using the stickyHeaders widget (not the css3 version) - * the "!important" flag, and "height: auto" can be removed */ - width: 100% !important; - height: auto !important; - } - - .tablesorter-bootstrap > thead > tr > th, - .tablesorter-bootstrap > thead > tr > td, - .tablesorter-bootstrap > tfoot > tr > th, - .tablesorter-bootstrap > tfoot > tr > td { - padding: 4px; - margin: 0; - } - - /* reflow widget only */ - .ui-table-reflow tbody td[data-title]:not(:first-child):before { - color: #469; - font-size: 1.5em; - content: attr(data-title); - width: 100%; - white-space: pre; - display: block; - } - - /* reflow2 widget only */ - table.ui-table-reflow .ui-table-cell-label { - display: none; - } - - table.ui-table-reflow .ui-table-cell-label.ui-table-cell-label-top { - display: block; - padding: .4em 0; - margin: .4em 0; - text-transform: uppercase; - font-size: 1.5em; - font-weight: 400; - } - -} /* end media query */ + /* uncomment out the line below if you don't want the sortable headers to show */ + table.ui-table-reflow thead { + display: none; + } + + .uf-table-search { + display: inherit; + } + + /* css for reflow & reflow2 widgets */ + .ui-table-reflow td, + .ui-table-reflow th { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: right; + /* if not using the stickyHeaders widget (not the css3 version) + * the "!important" flag, and "height: auto" can be removed */ + width: 100% !important; + height: auto !important; + } + + .tablesorter-bootstrap > thead > tr > th, + .tablesorter-bootstrap > thead > tr > td, + .tablesorter-bootstrap > tfoot > tr > th, + .tablesorter-bootstrap > tfoot > tr > td { + padding: 4px; + margin: 0; + } + + /* reflow widget only */ + .ui-table-reflow tbody td[data-title]:not(:first-child):before { + color: #469; + font-size: 1.5em; + content: attr(data-title); + width: 100%; + white-space: pre; + display: block; + } + + /* reflow2 widget only */ + table.ui-table-reflow .ui-table-cell-label { + display: none; + } + + table.ui-table-reflow .ui-table-cell-label.ui-table-cell-label-top { + display: block; + padding: .4em 0; + margin: .4em 0; + text-transform: uppercase; + font-size: 1.5em; + font-weight: 400; + } + +} + +/* end media query */ /* reflow2 widget */ .ui-table-reflow .ui-table-cell-label { - display: none; + display: none; } diff --git a/main/app/sprinkles/core/assets/userfrosting/css/uf-alerts.css b/main/app/sprinkles/core/assets/userfrosting/css/uf-alerts.css index 7ac5a97..1c6d45c 100644 --- a/main/app/sprinkles/core/assets/userfrosting/css/uf-alerts.css +++ b/main/app/sprinkles/core/assets/userfrosting/css/uf-alerts.css @@ -1,11 +1,9 @@ -.uf-alert -{ +.uf-alert { margin: 10px 0px 0px 0px; } /* Invert margin when inside a modal-body */ -.modal-body .uf-alert -{ +.modal-body .uf-alert { margin: 0px 0px 10px 0px; } diff --git a/main/app/sprinkles/core/assets/userfrosting/css/uf-collection.css b/main/app/sprinkles/core/assets/userfrosting/css/uf-collection.css index 432e1a4..4c5475a 100644 --- a/main/app/sprinkles/core/assets/userfrosting/css/uf-collection.css +++ b/main/app/sprinkles/core/assets/userfrosting/css/uf-collection.css @@ -10,6 +10,6 @@ } .uf-collection span.select2-dropdown.select2-dropdown--below { - position:absolute; + position: absolute; top: -32px; } diff --git a/main/app/sprinkles/core/assets/userfrosting/css/userfrosting.css b/main/app/sprinkles/core/assets/userfrosting/css/userfrosting.css index 38a92e2..b6dfe6f 100644 --- a/main/app/sprinkles/core/assets/userfrosting/css/userfrosting.css +++ b/main/app/sprinkles/core/assets/userfrosting/css/userfrosting.css @@ -10,7 +10,7 @@ label.label-switch { } form textarea { - resize: vertical; /* user can resize vertically, but width is fixed */ + resize: vertical; /* user can resize vertically, but width is fixed */ } /* Custom styling for table tool menus */ @@ -109,42 +109,43 @@ form textarea { /* Styling for AdminLTE form control icons, that doesn't interfere with validation plugin */ .form-control-icon { - position: absolute; - top: 0; - right: 0; - z-index: 2; - display: block; - width: 34px; - height: 34px; - line-height: 34px; - text-align: center; - pointer-events: none; + position: absolute; + top: 0; + right: 0; + z-index: 2; + display: block; + width: 34px; + height: 34px; + line-height: 34px; + text-align: center; + pointer-events: none; } .input-lg ~ .form-control-icon, .input-group-lg ~ .form-control-icon, .form-group-lg .form-control ~ .form-control-icon { - width: 46px; - height: 46px; - line-height: 46px; + width: 46px; + height: 46px; + line-height: 46px; } + .input-sm ~ .form-control-icon, .input-group-sm ~ .form-control-icon, .form-group-sm .form-control ~ .form-control-icon { - width: 30px; - height: 30px; - line-height: 30px; + width: 30px; + height: 30px; + line-height: 30px; } @media (min-width: 768px) { - .form-inline .has-feedback .form-control-icon, - .navbar-form .has-feedback .form-control-icon { - top: 0; - } + .form-inline .has-feedback .form-control-icon, + .navbar-form .has-feedback .form-control-icon { + top: 0; + } } .form-horizontal .has-feedback .form-control-icon { - right: 15px; + right: 15px; } /* Fix for select2 not resizing properly when the page is resized */ @@ -192,11 +193,12 @@ a .info-box { left: auto; } -@media(min-width: 561px) { +@media (min-width: 561px) { .dropdown-menu-right-responsive { right: 0; left: auto; } + .dropdown-menu-left-responsive { right: auto; left: 0; diff --git a/main/app/sprinkles/core/assets/userfrosting/favicons/ieconfig.xml b/main/app/sprinkles/core/assets/userfrosting/favicons/ieconfig.xml index e3e3d05..a008d3d 100644 --- a/main/app/sprinkles/core/assets/userfrosting/favicons/ieconfig.xml +++ b/main/app/sprinkles/core/assets/userfrosting/favicons/ieconfig.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <browserconfig> - <msapplication> - <tile> - <square70x70logo src="/mstile-70x70.png"/> - <square150x150logo src="/mstile-150x150.png"/> - <square310x310logo src="/mstile-310x310.png"/> - <wide310x150logo src="/mstile-310x150.png"/> - <TileColor>#603cba</TileColor> - </tile> - </msapplication> + <msapplication> + <tile> + <square70x70logo src="/mstile-70x70.png"/> + <square150x150logo src="/mstile-150x150.png"/> + <square310x310logo src="/mstile-310x310.png"/> + <wide310x150logo src="/mstile-310x150.png"/> + <TileColor>#603cba</TileColor> + </tile> + </msapplication> </browserconfig> diff --git a/main/app/sprinkles/core/assets/userfrosting/favicons/manifest.json b/main/app/sprinkles/core/assets/userfrosting/favicons/manifest.json index 328cd7a..51628c7 100644 --- a/main/app/sprinkles/core/assets/userfrosting/favicons/manifest.json +++ b/main/app/sprinkles/core/assets/userfrosting/favicons/manifest.json @@ -1,51 +1,51 @@ { - "name": "UserFrosting", - "icons": [ - { - "src": "\/android-chrome-36x36.png", - "sizes": "36x36", - "type": "image\/png" - }, - { - "src": "\/android-chrome-48x48.png", - "sizes": "48x48", - "type": "image\/png" - }, - { - "src": "\/android-chrome-72x72.png", - "sizes": "72x72", - "type": "image\/png" - }, - { - "src": "\/android-chrome-96x96.png", - "sizes": "96x96", - "type": "image\/png" - }, - { - "src": "\/android-chrome-144x144.png", - "sizes": "144x144", - "type": "image\/png" - }, - { - "src": "\/android-chrome-192x192.png", - "sizes": "192x192", - "type": "image\/png" - }, - { - "src": "\/android-chrome-256x256.png", - "sizes": "256x256", - "type": "image\/png" - }, - { - "src": "\/android-chrome-384x384.png", - "sizes": "384x384", - "type": "image\/png" - }, - { - "src": "\/android-chrome-512x512.png", - "sizes": "512x512", - "type": "image\/png" - } - ], - "theme_color": "#f3f2e4" + "name": "UserFrosting", + "icons": [ + { + "src": "\/android-chrome-36x36.png", + "sizes": "36x36", + "type": "image\/png" + }, + { + "src": "\/android-chrome-48x48.png", + "sizes": "48x48", + "type": "image\/png" + }, + { + "src": "\/android-chrome-72x72.png", + "sizes": "72x72", + "type": "image\/png" + }, + { + "src": "\/android-chrome-96x96.png", + "sizes": "96x96", + "type": "image\/png" + }, + { + "src": "\/android-chrome-144x144.png", + "sizes": "144x144", + "type": "image\/png" + }, + { + "src": "\/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image\/png" + }, + { + "src": "\/android-chrome-256x256.png", + "sizes": "256x256", + "type": "image\/png" + }, + { + "src": "\/android-chrome-384x384.png", + "sizes": "384x384", + "type": "image\/png" + }, + { + "src": "\/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image\/png" + } + ], + "theme_color": "#f3f2e4" } diff --git a/main/app/sprinkles/core/assets/userfrosting/favicons/safari-pinned-tab.svg b/main/app/sprinkles/core/assets/userfrosting/favicons/safari-pinned-tab.svg index 2435014..67d76d2 100644 --- a/main/app/sprinkles/core/assets/userfrosting/favicons/safari-pinned-tab.svg +++ b/main/app/sprinkles/core/assets/userfrosting/favicons/safari-pinned-tab.svg @@ -1,21 +1,21 @@ <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" - "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> + "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <svg version="1.0" xmlns="http://www.w3.org/2000/svg" - width="2061.000000pt" height="2061.000000pt" viewBox="0 0 2061.000000 2061.000000" - preserveAspectRatio="xMidYMid meet"> -<metadata> -Created by potrace 1.11, written by Peter Selinger 2001-2013 -</metadata> -<g transform="translate(0.000000,2061.000000) scale(0.100000,-0.100000)" -fill="#000000" stroke="none"> -<path d="M11924 20602 c-23 -15 -154 -225 -166 -265 -6 -23 -24 -56 -38 -73 + width="2061.000000pt" height="2061.000000pt" viewBox="0 0 2061.000000 2061.000000" + preserveAspectRatio="xMidYMid meet"> + <metadata> + Created by potrace 1.11, written by Peter Selinger 2001-2013 + </metadata> + <g transform="translate(0.000000,2061.000000) scale(0.100000,-0.100000)" + fill="#000000" stroke="none"> + <path d="M11924 20602 c-23 -15 -154 -225 -166 -265 -6 -23 -24 -56 -38 -73 -29 -34 -77 -193 -104 -344 -34 -185 -47 -488 -25 -547 13 -34 59 -84 71 -77 4 3 8 38 8 77 0 40 5 135 10 212 27 360 96 596 235 800 53 77 85 145 85 180 0 34 -47 57 -76 37z"/> -<path d="M9482 18775 c-113 -29 -217 -78 -303 -142 l-64 -48 56 -8 c48 -8 63 + <path d="M9482 18775 c-113 -29 -217 -78 -303 -142 l-64 -48 56 -8 c48 -8 63 -6 102 12 25 12 77 28 114 37 126 28 178 67 197 147 8 32 14 32 -102 2z"/> -<path d="M11641 18720 c-26 -43 -26 -66 -1 -132 22 -58 26 -118 10 -148 -15 + <path d="M11641 18720 c-26 -43 -26 -66 -1 -132 22 -58 26 -118 10 -148 -15 -28 -47 -42 -110 -49 l-55 -6 74 -24 c40 -14 146 -60 235 -104 236 -116 321 -152 442 -187 137 -39 306 -121 410 -197 110 -83 250 -233 334 -360 40 -60 107 -180 151 -268 43 -88 97 -189 119 -224 38 -62 45 -86 41 -141 -4 -50 -6 @@ -201,12 +201,12 @@ l-98 -6 0 99 c0 54 9 430 20 834 34 1295 42 1820 38 2510 -4 642 -6 679 -25 89 -726 87 -728 -12 -11 -41 15 -61 56 -21 41 -22 49 -10 76 19 44 17 158 -6 252 -11 45 -27 144 -35 220 -9 76 -31 242 -50 368 -58 395 -60 415 -40 460 10 22 19 36 21 30 2 -5 44 -336 94 -734z"/> -<path d="M7997 17171 c-21 -10 -55 -34 -75 -53 -20 -19 -71 -62 -113 -96 -42 + <path d="M7997 17171 c-21 -10 -55 -34 -75 -53 -20 -19 -71 -62 -113 -96 -42 -33 -98 -85 -126 -115 l-50 -55 -7 -94 c-12 -177 22 -403 79 -524 33 -68 111 -160 157 -185 27 -15 27 -15 -56 183 -37 86 -74 191 -83 232 -15 70 -15 78 1 121 30 78 84 91 228 54 105 -27 147 -18 173 38 16 33 18 64 16 228 -2 196 -6 251 -24 273 -14 17 -75 14 -120 -7z"/> -<path d="M6910 17111 c-207 -255 -261 -331 -432 -617 -160 -266 -161 -270 + <path d="M6910 17111 c-207 -255 -261 -331 -432 -617 -160 -266 -161 -270 -124 -544 8 -63 20 -218 26 -345 11 -253 21 -340 51 -448 11 -40 24 -94 30 -122 14 -64 41 -109 85 -135 27 -17 34 -28 34 -53 0 -34 31 -110 48 -121 16 -10 35 32 28 60 -4 13 -19 38 -35 56 -23 27 -37 68 -74 213 -55 216 -72 331 @@ -217,14 +217,14 @@ l-98 -6 0 99 c0 54 9 430 20 834 34 1295 42 1820 38 2510 -4 642 -6 679 -25 -52 80 -163 301 -201 400 -58 151 -83 274 -82 406 1 69 8 143 16 175 45 172 85 286 131 375 50 97 51 102 51 185 0 83 -20 200 -33 200 -4 -1 -14 -9 -22 -19z"/> -<path d="M4200 15495 c-19 -19 -42 -35 -53 -35 -10 0 -39 -21 -65 -47 -26 -25 + <path d="M4200 15495 c-19 -19 -42 -35 -53 -35 -10 0 -39 -21 -65 -47 -26 -25 -35 -37 -21 -25 14 12 32 22 40 22 23 1 53 22 98 73 50 55 51 64 1 12z"/> -<path d="M3930 13725 c-7 -8 -21 -15 -33 -15 -28 0 -81 -35 -111 -74 -14 -19 + <path d="M3930 13725 c-7 -8 -21 -15 -33 -15 -28 0 -81 -35 -111 -74 -14 -19 -41 -44 -60 -56 -19 -11 -107 -98 -195 -191 -137 -145 -166 -182 -201 -252 -30 -62 -42 -99 -46 -152 l-6 -70 46 -43 c27 -25 55 -42 69 -42 31 0 88 39 104 70 7 14 32 66 55 115 24 50 87 158 140 240 133 210 219 364 225 405 3 19 15 45 26 58 11 12 16 22 10 22 -6 0 -16 -7 -23 -15z"/> -<path d="M2674 13567 c-25 -14 -132 -145 -192 -234 -98 -145 -190 -374 -227 + <path d="M2674 13567 c-25 -14 -132 -145 -192 -234 -98 -145 -190 -374 -227 -563 -49 -255 11 -719 131 -1009 111 -269 296 -490 779 -933 371 -340 858 -778 862 -774 3 2 -1 23 -7 46 -9 34 -49 81 -222 263 -522 549 -1019 1133 -1175 1382 -53 84 -112 216 -134 300 -39 150 -22 409 44 685 l13 55 18 -80 @@ -232,15 +232,15 @@ c42 -186 147 -439 255 -618 27 -45 52 -100 56 -122 11 -57 22 -75 56 -87 24 -8 29 -15 29 -43 0 -32 21 -65 40 -65 5 0 17 11 25 24 21 31 6 63 -35 77 -25 9 -28 16 -32 64 -3 40 -14 70 -41 113 -59 96 -133 376 -156 594 -21 192 -8 400 38 583 44 177 46 199 27 249 -28 73 -106 121 -152 93z"/> -<path d="M5265 6405 c56 -741 1232 -4262 1540 -4612 13 -16 25 -22 25 -15 0 7 + <path d="M5265 6405 c56 -741 1232 -4262 1540 -4612 13 -16 25 -22 25 -15 0 7 -22 86 -50 175 -71 234 -180 621 -335 1197 -335 1241 -499 1768 -740 2380 -128 325 -382 878 -430 935 -15 19 -16 16 -10 -60z"/> -<path d="M5345 4220 c6 -31 41 -162 187 -685 50 -181 91 -381 118 -575 39 + <path d="M5345 4220 c6 -31 41 -162 187 -685 50 -181 91 -381 118 -575 39 -283 116 -539 255 -840 34 -74 67 -149 74 -167 20 -51 54 -76 90 -68 38 8 71 48 71 85 0 40 -34 201 -81 380 -76 292 -174 561 -424 1160 -70 168 -165 404 -212 525 -46 121 -81 204 -78 185z"/> -<path d="M5125 3042 c1 -265 3 -275 126 -456 107 -160 195 -265 253 -306 41 + <path d="M5125 3042 c1 -265 3 -275 126 -456 107 -160 195 -265 253 -306 41 -28 66 -37 66 -25 0 3 -23 50 -50 105 -28 56 -103 232 -166 393 -100 251 -200 475 -222 499 -4 4 -7 -91 -7 -210z"/> -</g> + </g> </svg> diff --git a/main/app/sprinkles/core/assets/userfrosting/js/AdminLTE-custom.js b/main/app/sprinkles/core/assets/userfrosting/js/AdminLTE-custom.js index 177c845..71f679b 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/AdminLTE-custom.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/AdminLTE-custom.js @@ -11,7 +11,7 @@ //Make sure jQuery has been loaded before app.js if (typeof jQuery === "undefined") { - throw new Error("AdminLTE requires jQuery"); + throw new Error("AdminLTE requires jQuery"); } /* Tree_UF() @@ -22,52 +22,52 @@ if (typeof jQuery === "undefined") { * @Usage: $.AdminLTE.tree_UF('.sidebar') */ $.AdminLTE.tree_UF = function (menu) { - var _this = this; - var animationSpeed = $.AdminLTE.options.animationSpeed; - $(document).off('click', menu + ' li a').on('click', menu + ' li a', function (e) { + var _this = this; + var animationSpeed = $.AdminLTE.options.animationSpeed; + $(document).off('click', menu + ' li a').on('click', menu + ' li a', function (e) { - //Get the clicked link and the next element - var $this = $(this); - var checkElement = $this.next(); + //Get the clicked link and the next element + var $this = $(this); + var checkElement = $this.next(); - //Check if the next element is a menu and is visible - if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) { - //Close the menu - checkElement.slideUp(animationSpeed, function () { - checkElement.removeClass('menu-open'); - //Fix the layout in case the sidebar stretches over the height of the window - //_this.layout.fix(); - }); - checkElement.parent("li").removeClass("active"); - } - //If the menu is not visible - else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) { - //Get the parent menu - var parent = $this.parents('ul').first(); - //Close all open menus within the parent - var ul = parent.find('ul:visible').slideUp(animationSpeed); - //Remove the menu-open class from the parent - ul.removeClass('menu-open'); - //Get the parent li - var parent_li = $this.parent("li"); + //Check if the next element is a menu and is visible + if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) { + //Close the menu + checkElement.slideUp(animationSpeed, function () { + checkElement.removeClass('menu-open'); + //Fix the layout in case the sidebar stretches over the height of the window + //_this.layout.fix(); + }); + checkElement.parent("li").removeClass("active"); + } + //If the menu is not visible + else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) { + //Get the parent menu + var parent = $this.parents('ul').first(); + //Close all open menus within the parent + var ul = parent.find('ul:visible').slideUp(animationSpeed); + //Remove the menu-open class from the parent + ul.removeClass('menu-open'); + //Get the parent li + var parent_li = $this.parent("li"); - //Open the target menu and add the menu-open class - checkElement.slideDown(animationSpeed, function () { + //Open the target menu and add the menu-open class + checkElement.slideDown(animationSpeed, function () { - //Add the class active to the parent li - checkElement.addClass('menu-open'); - parent.find('li.treeview.active').removeClass('active'); //<<-- Overwrite here. Otherwise, the menu href based active will be removed - parent_li.addClass('active'); + //Add the class active to the parent li + checkElement.addClass('menu-open'); + parent.find('li.treeview.active').removeClass('active'); //<<-- Overwrite here. Otherwise, the menu href based active will be removed + parent_li.addClass('active'); - //Fix the layout in case the sidebar stretches over the height of the window - _this.layout.fix(); - }); - } - //if this isn't a link, prevent the page from being redirected - if (checkElement.is('.treeview-menu')) { - e.preventDefault(); - } - }); + //Fix the layout in case the sidebar stretches over the height of the window + _this.layout.fix(); + }); + } + //if this isn't a link, prevent the page from being redirected + if (checkElement.is('.treeview-menu')) { + e.preventDefault(); + } + }); }; /* initMenu() @@ -79,7 +79,7 @@ $.AdminLTE.tree_UF = function (menu) { */ $.AdminLTE.initMenu = function (searchElement) { var _this = this; - var element = $(searchElement).filter(function() { + var element = $(searchElement).filter(function () { // Strip out everything after the hash, if present var url_head = window.location.href.split('#', 1)[0]; return this.href == url_head; // || url.href.indexOf(this.href) == 0 // Include this if you want to color all parent URIs as well @@ -89,24 +89,24 @@ $.AdminLTE.initMenu = function (searchElement) { $(element).parents('.treeview-menu').addClass('menu-open'); }; -$(function() { +$(function () { //Init menu and trees $.AdminLTE.initMenu('ul.sidebar-menu a'); $.AdminLTE.tree_UF('.sidebar'); // Apply select2 to all js-select2 elements - $('.js-select2').select2({ minimumResultsForSearch: Infinity }); + $('.js-select2').select2({minimumResultsForSearch: Infinity}); // Apply iCheck to all js-icheck elements $('.js-icheck').iCheck({ - checkboxClass: 'icheckbox_square-blue', - radioClass: 'iradio_square-blue', - increaseArea: '20%' // optional + checkboxClass: 'icheckbox_square-blue', + radioClass: 'iradio_square-blue', + increaseArea: '20%' // optional }); // Remember the sidebar collapse state // See: https://github.com/almasaeed2010/AdminLTE/issues/896#issuecomment-264723101 - $('.sidebar-toggle').click(function(event) { + $('.sidebar-toggle').click(function (event) { event.preventDefault(); if (Boolean(sessionStorage.getItem('sidebar-toggle-collapsed'))) { sessionStorage.setItem('sidebar-toggle-collapsed', ''); diff --git a/main/app/sprinkles/core/assets/userfrosting/js/AdminLTE.js b/main/app/sprinkles/core/assets/userfrosting/js/AdminLTE.js index 54b6055..8f31ca5 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/AdminLTE.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/AdminLTE.js @@ -13,7 +13,7 @@ //Make sure jQuery has been loaded before app.js if (typeof jQuery === "undefined") { - throw new Error("AdminLTE requires jQuery"); + throw new Error("AdminLTE requires jQuery"); } /* AdminLTE @@ -33,101 +33,101 @@ $.AdminLTE = {}; * Modify these options to suit your implementation */ $.AdminLTE.options = { - //Add slimscroll to navbar menus - //This requires you to load the slimscroll plugin - //in every page before app.js - navbarMenuSlimscroll: true, - navbarMenuSlimscrollWidth: "3px", //The width of the scroll bar - navbarMenuHeight: "200px", //The height of the inner menu - //General animation speed for JS animated elements such as box collapse/expand and - //sidebar treeview slide up/down. This options accepts an integer as milliseconds, - //'fast', 'normal', or 'slow' - animationSpeed: 500, - //Sidebar push menu toggle button selector - sidebarToggleSelector: "[data-toggle='offcanvas']", - //Activate sidebar push menu - sidebarPushMenu: true, - //Activate sidebar slimscroll if the fixed layout is set (requires SlimScroll Plugin) - sidebarSlimScroll: true, - //Enable sidebar expand on hover effect for sidebar mini - //This option is forced to true if both the fixed layout and sidebar mini - //are used together - sidebarExpandOnHover: false, - //BoxRefresh Plugin - enableBoxRefresh: true, - //Bootstrap.js tooltip - enableBSToppltip: true, - BSTooltipSelector: "[data-toggle='tooltip']", - //Enable Fast Click. Fastclick.js creates a more - //native touch experience with touch devices. If you - //choose to enable the plugin, make sure you load the script - //before AdminLTE's app.js - enableFastclick: false, - //Control Sidebar Options - enableControlSidebar: true, - controlSidebarOptions: { - //Which button should trigger the open/close event - toggleBtnSelector: "[data-toggle='control-sidebar']", - //The sidebar selector - selector: ".control-sidebar", - //Enable slide over content - slide: true - }, - //Box Widget Plugin. Enable this plugin - //to allow boxes to be collapsed and/or removed - enableBoxWidget: true, - //Box Widget plugin options - boxWidgetOptions: { - boxWidgetIcons: { - //Collapse icon - collapse: 'fa-minus', - //Open icon - open: 'fa-plus', - //Remove icon - remove: 'fa-times' + //Add slimscroll to navbar menus + //This requires you to load the slimscroll plugin + //in every page before app.js + navbarMenuSlimscroll: true, + navbarMenuSlimscrollWidth: "3px", //The width of the scroll bar + navbarMenuHeight: "200px", //The height of the inner menu + //General animation speed for JS animated elements such as box collapse/expand and + //sidebar treeview slide up/down. This options accepts an integer as milliseconds, + //'fast', 'normal', or 'slow' + animationSpeed: 500, + //Sidebar push menu toggle button selector + sidebarToggleSelector: "[data-toggle='offcanvas']", + //Activate sidebar push menu + sidebarPushMenu: true, + //Activate sidebar slimscroll if the fixed layout is set (requires SlimScroll Plugin) + sidebarSlimScroll: true, + //Enable sidebar expand on hover effect for sidebar mini + //This option is forced to true if both the fixed layout and sidebar mini + //are used together + sidebarExpandOnHover: false, + //BoxRefresh Plugin + enableBoxRefresh: true, + //Bootstrap.js tooltip + enableBSToppltip: true, + BSTooltipSelector: "[data-toggle='tooltip']", + //Enable Fast Click. Fastclick.js creates a more + //native touch experience with touch devices. If you + //choose to enable the plugin, make sure you load the script + //before AdminLTE's app.js + enableFastclick: false, + //Control Sidebar Options + enableControlSidebar: true, + controlSidebarOptions: { + //Which button should trigger the open/close event + toggleBtnSelector: "[data-toggle='control-sidebar']", + //The sidebar selector + selector: ".control-sidebar", + //Enable slide over content + slide: true }, - boxWidgetSelectors: { - //Remove button selector - remove: '[data-widget="remove"]', - //Collapse button selector - collapse: '[data-widget="collapse"]' + //Box Widget Plugin. Enable this plugin + //to allow boxes to be collapsed and/or removed + enableBoxWidget: true, + //Box Widget plugin options + boxWidgetOptions: { + boxWidgetIcons: { + //Collapse icon + collapse: 'fa-minus', + //Open icon + open: 'fa-plus', + //Remove icon + remove: 'fa-times' + }, + boxWidgetSelectors: { + //Remove button selector + remove: '[data-widget="remove"]', + //Collapse button selector + collapse: '[data-widget="collapse"]' + } + }, + //Direct Chat plugin options + directChat: { + //Enable direct chat by default + enable: true, + //The button to open and close the chat contacts pane + contactToggleSelector: '[data-widget="chat-pane-toggle"]' + }, + //Define the set of colors to use globally around the website + colors: { + lightBlue: "#3c8dbc", + red: "#f56954", + green: "#00a65a", + aqua: "#00c0ef", + yellow: "#f39c12", + blue: "#0073b7", + navy: "#001F3F", + teal: "#39CCCC", + olive: "#3D9970", + lime: "#01FF70", + orange: "#FF851B", + fuchsia: "#F012BE", + purple: "#8E24AA", + maroon: "#D81B60", + black: "#222222", + gray: "#d2d6de" + }, + //The standard screen sizes that bootstrap uses. + //If you change these in the variables.less file, change + //them here too. + screenSizes: { + xs: 480, + sm: 768, + md: 992, + lg: 1200 } - }, - //Direct Chat plugin options - directChat: { - //Enable direct chat by default - enable: true, - //The button to open and close the chat contacts pane - contactToggleSelector: '[data-widget="chat-pane-toggle"]' - }, - //Define the set of colors to use globally around the website - colors: { - lightBlue: "#3c8dbc", - red: "#f56954", - green: "#00a65a", - aqua: "#00c0ef", - yellow: "#f39c12", - blue: "#0073b7", - navy: "#001F3F", - teal: "#39CCCC", - olive: "#3D9970", - lime: "#01FF70", - orange: "#FF851B", - fuchsia: "#F012BE", - purple: "#8E24AA", - maroon: "#D81B60", - black: "#222222", - gray: "#d2d6de" - }, - //The standard screen sizes that bootstrap uses. - //If you change these in the variables.less file, change - //them here too. - screenSizes: { - xs: 480, - sm: 768, - md: 992, - lg: 1200 - } }; /* ------------------ @@ -138,87 +138,87 @@ $.AdminLTE.options = { * options above. */ $(function () { - "use strict"; - - //Fix for IE page transitions - $("body").removeClass("hold-transition"); - - //Extend options if external options exist - if (typeof AdminLTEOptions !== "undefined") { - $.extend(true, - $.AdminLTE.options, - AdminLTEOptions); - } - - //Easy access to options - var o = $.AdminLTE.options; - - //Set up the object - _init(); - - //Activate the layout maker - $.AdminLTE.layout.activate(); - - //Enable sidebar tree view controls - $.AdminLTE.tree('.sidebar'); - - //Enable control sidebar - if (o.enableControlSidebar) { - $.AdminLTE.controlSidebar.activate(); - } - - //Add slimscroll to navbar dropdown - if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') { - $(".navbar .menu").slimscroll({ - height: o.navbarMenuHeight, - alwaysVisible: false, - size: o.navbarMenuSlimscrollWidth - }).css("width", "100%"); - } - - //Activate sidebar push menu - if (o.sidebarPushMenu) { - $.AdminLTE.pushMenu.activate(o.sidebarToggleSelector); - } - - //Activate Bootstrap tooltip - if (o.enableBSToppltip) { - $('body').tooltip({ - selector: o.BSTooltipSelector - }); - } - - //Activate box widget - if (o.enableBoxWidget) { - $.AdminLTE.boxWidget.activate(); - } - - //Activate fast click - if (o.enableFastclick && typeof FastClick != 'undefined') { - FastClick.attach(document.body); - } - - //Activate direct chat widget - if (o.directChat.enable) { - $(document).on('click', o.directChat.contactToggleSelector, function () { - var box = $(this).parents('.direct-chat').first(); - box.toggleClass('direct-chat-contacts-open'); - }); - } - - /* - * INITIALIZE BUTTON TOGGLE - * ------------------------ - */ - $('.btn-group[data-toggle="btn-toggle"]').each(function () { - var group = $(this); - $(this).find(".btn").on('click', function (e) { - group.find(".btn.active").removeClass("active"); - $(this).addClass("active"); - e.preventDefault(); - }); + "use strict"; + + //Fix for IE page transitions + $("body").removeClass("hold-transition"); + + //Extend options if external options exist + if (typeof AdminLTEOptions !== "undefined") { + $.extend(true, + $.AdminLTE.options, + AdminLTEOptions); + } + + //Easy access to options + var o = $.AdminLTE.options; + + //Set up the object + _init(); + + //Activate the layout maker + $.AdminLTE.layout.activate(); + + //Enable sidebar tree view controls + $.AdminLTE.tree('.sidebar'); + + //Enable control sidebar + if (o.enableControlSidebar) { + $.AdminLTE.controlSidebar.activate(); + } + + //Add slimscroll to navbar dropdown + if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') { + $(".navbar .menu").slimscroll({ + height: o.navbarMenuHeight, + alwaysVisible: false, + size: o.navbarMenuSlimscrollWidth + }).css("width", "100%"); + } + + //Activate sidebar push menu + if (o.sidebarPushMenu) { + $.AdminLTE.pushMenu.activate(o.sidebarToggleSelector); + } - }); + //Activate Bootstrap tooltip + if (o.enableBSToppltip) { + $('body').tooltip({ + selector: o.BSTooltipSelector + }); + } + + //Activate box widget + if (o.enableBoxWidget) { + $.AdminLTE.boxWidget.activate(); + } + + //Activate fast click + if (o.enableFastclick && typeof FastClick != 'undefined') { + FastClick.attach(document.body); + } + + //Activate direct chat widget + if (o.directChat.enable) { + $(document).on('click', o.directChat.contactToggleSelector, function () { + var box = $(this).parents('.direct-chat').first(); + box.toggleClass('direct-chat-contacts-open'); + }); + } + + /* + * INITIALIZE BUTTON TOGGLE + * ------------------------ + */ + $('.btn-group[data-toggle="btn-toggle"]').each(function () { + var group = $(this); + $(this).find(".btn").on('click', function (e) { + group.find(".btn.active").removeClass("active"); + $(this).addClass("active"); + e.preventDefault(); + }); + + }); }); /* ---------------------------------- @@ -227,370 +227,370 @@ $(function () { * All AdminLTE functions are implemented below. */ function _init() { - 'use strict'; - /* Layout - * ====== - * Fixes the layout height in case min-height fails. - * - * @type Object - * @usage $.AdminLTE.layout.activate() - * $.AdminLTE.layout.fix() - * $.AdminLTE.layout.fixSidebar() - */ - $.AdminLTE.layout = { - activate: function () { - var _this = this; - _this.fix(); - _this.fixSidebar(); - $(window, ".wrapper").resize(function () { - _this.fix(); - _this.fixSidebar(); - }); - }, - fix: function () { - //Get window height and the wrapper height - var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight(); - var window_height = $(window).height(); - var sidebar_height = $(".sidebar").height(); - //Set the min-height of the content and sidebar based on the - //the height of the document. - if ($("body").hasClass("fixed")) { - $(".content-wrapper, .right-side").css('min-height', window_height - $('.main-footer').outerHeight()); - } else { - var postSetWidth; - if (window_height >= sidebar_height) { - $(".content-wrapper, .right-side").css('min-height', window_height - neg); - postSetWidth = window_height - neg; - } else { - $(".content-wrapper, .right-side").css('min-height', sidebar_height); - postSetWidth = sidebar_height; + 'use strict'; + /* Layout + * ====== + * Fixes the layout height in case min-height fails. + * + * @type Object + * @usage $.AdminLTE.layout.activate() + * $.AdminLTE.layout.fix() + * $.AdminLTE.layout.fixSidebar() + */ + $.AdminLTE.layout = { + activate: function () { + var _this = this; + _this.fix(); + _this.fixSidebar(); + $(window, ".wrapper").resize(function () { + _this.fix(); + _this.fixSidebar(); + }); + }, + fix: function () { + //Get window height and the wrapper height + var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight(); + var window_height = $(window).height(); + var sidebar_height = $(".sidebar").height(); + //Set the min-height of the content and sidebar based on the + //the height of the document. + if ($("body").hasClass("fixed")) { + $(".content-wrapper, .right-side").css('min-height', window_height - $('.main-footer').outerHeight()); + } else { + var postSetWidth; + if (window_height >= sidebar_height) { + $(".content-wrapper, .right-side").css('min-height', window_height - neg); + postSetWidth = window_height - neg; + } else { + $(".content-wrapper, .right-side").css('min-height', sidebar_height); + postSetWidth = sidebar_height; + } + + //Fix for the control sidebar height + var controlSidebar = $($.AdminLTE.options.controlSidebarOptions.selector); + if (typeof controlSidebar !== "undefined") { + if (controlSidebar.height() > postSetWidth) + $(".content-wrapper, .right-side").css('min-height', controlSidebar.height()); + } + + } + }, + fixSidebar: function () { + //Make sure the body tag has the .fixed class + if (!$("body").hasClass("fixed")) { + if (typeof $.fn.slimScroll != 'undefined') { + $(".sidebar").slimScroll({destroy: true}).height("auto"); + } + return; + } else if (typeof $.fn.slimScroll == 'undefined' && window.console) { + window.console.error("Error: the fixed layout requires the slimscroll plugin!"); + } + //Enable slimscroll for fixed layout + if ($.AdminLTE.options.sidebarSlimScroll) { + if (typeof $.fn.slimScroll != 'undefined') { + //Destroy if it exists + $(".sidebar").slimScroll({destroy: true}).height("auto"); + //Add slimscroll + $(".sidebar").slimscroll({ + height: ($(window).height() - $(".main-header").height()) + "px", + color: "rgba(0,0,0,0.2)", + size: "3px" + }); + } + } } - - //Fix for the control sidebar height - var controlSidebar = $($.AdminLTE.options.controlSidebarOptions.selector); - if (typeof controlSidebar !== "undefined") { - if (controlSidebar.height() > postSetWidth) - $(".content-wrapper, .right-side").css('min-height', controlSidebar.height()); + }; + + /* PushMenu() + * ========== + * Adds the push menu functionality to the sidebar. + * + * @type Function + * @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']") + */ + $.AdminLTE.pushMenu = { + activate: function (toggleBtn) { + //Get the screen sizes + var screenSizes = $.AdminLTE.options.screenSizes; + + //Enable sidebar toggle + $(document).on('click', toggleBtn, function (e) { + e.preventDefault(); + + //Enable sidebar push menu + if ($(window).width() > (screenSizes.sm - 1)) { + if ($("body").hasClass('sidebar-collapse')) { + $("body").removeClass('sidebar-collapse').trigger('expanded.pushMenu'); + } else { + $("body").addClass('sidebar-collapse').trigger('collapsed.pushMenu'); + } + } + //Handle sidebar push menu for small screens + else { + if ($("body").hasClass('sidebar-open')) { + $("body").removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu'); + } else { + $("body").addClass('sidebar-open').trigger('expanded.pushMenu'); + } + } + }); + + $(".content-wrapper").click(function () { + //Enable hide menu when clicking on the content-wrapper on small screens + if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) { + $("body").removeClass('sidebar-open'); + } + }); + + //Enable expand on hover for sidebar mini + if ($.AdminLTE.options.sidebarExpandOnHover + || ($('body').hasClass('fixed') + && $('body').hasClass('sidebar-mini'))) { + this.expandOnHover(); + } + }, + expandOnHover: function () { + var _this = this; + var screenWidth = $.AdminLTE.options.screenSizes.sm - 1; + //Expand sidebar on hover + $('.main-sidebar').hover(function () { + if ($('body').hasClass('sidebar-mini') + && $("body").hasClass('sidebar-collapse') + && $(window).width() > screenWidth) { + _this.expand(); + } + }, function () { + if ($('body').hasClass('sidebar-mini') + && $('body').hasClass('sidebar-expanded-on-hover') + && $(window).width() > screenWidth) { + _this.collapse(); + } + }); + }, + expand: function () { + $("body").removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover'); + }, + collapse: function () { + if ($('body').hasClass('sidebar-expanded-on-hover')) { + $('body').removeClass('sidebar-expanded-on-hover').addClass('sidebar-collapse'); + } } - - } - }, - fixSidebar: function () { - //Make sure the body tag has the .fixed class - if (!$("body").hasClass("fixed")) { - if (typeof $.fn.slimScroll != 'undefined') { - $(".sidebar").slimScroll({destroy: true}).height("auto"); + }; + + /* Tree() + * ====== + * Converts the sidebar into a multilevel + * tree view menu. + * + * @type Function + * @Usage: $.AdminLTE.tree('.sidebar') + */ + $.AdminLTE.tree = function (menu) { + var _this = this; + var animationSpeed = $.AdminLTE.options.animationSpeed; + $(document).off('click', menu + ' li a') + .on('click', menu + ' li a', function (e) { + //Get the clicked link and the next element + var $this = $(this); + var checkElement = $this.next(); + + //Check if the next element is a menu and is visible + if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) { + //Close the menu + checkElement.slideUp(animationSpeed, function () { + checkElement.removeClass('menu-open'); + //Fix the layout in case the sidebar stretches over the height of the window + //_this.layout.fix(); + }); + checkElement.parent("li").removeClass("active"); + } + //If the menu is not visible + else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) { + //Get the parent menu + var parent = $this.parents('ul').first(); + //Close all open menus within the parent + var ul = parent.find('ul:visible').slideUp(animationSpeed); + //Remove the menu-open class from the parent + ul.removeClass('menu-open'); + //Get the parent li + var parent_li = $this.parent("li"); + + //Open the target menu and add the menu-open class + checkElement.slideDown(animationSpeed, function () { + //Add the class active to the parent li + checkElement.addClass('menu-open'); + parent.find('li.active').removeClass('active'); + parent_li.addClass('active'); + //Fix the layout in case the sidebar stretches over the height of the window + _this.layout.fix(); + }); + } + //if this isn't a link, prevent the page from being redirected + if (checkElement.is('.treeview-menu')) { + e.preventDefault(); + } + }); + }; + + /* ControlSidebar + * ============== + * Adds functionality to the right sidebar + * + * @type Object + * @usage $.AdminLTE.controlSidebar.activate(options) + */ + $.AdminLTE.controlSidebar = { + //instantiate the object + activate: function () { + //Get the object + var _this = this; + //Update options + var o = $.AdminLTE.options.controlSidebarOptions; + //Get the sidebar + var sidebar = $(o.selector); + //The toggle button + var btn = $(o.toggleBtnSelector); + + //Listen to the click event + btn.on('click', function (e) { + e.preventDefault(); + //If the sidebar is not open + if (!sidebar.hasClass('control-sidebar-open') + && !$('body').hasClass('control-sidebar-open')) { + //Open the sidebar + _this.open(sidebar, o.slide); + } else { + _this.close(sidebar, o.slide); + } + }); + + //If the body has a boxed layout, fix the sidebar bg position + var bg = $(".control-sidebar-bg"); + _this._fix(bg); + + //If the body has a fixed layout, make the control sidebar fixed + if ($('body').hasClass('fixed')) { + _this._fixForFixed(sidebar); + } else { + //If the content height is less than the sidebar's height, force max height + if ($('.content-wrapper, .right-side').height() < sidebar.height()) { + _this._fixForContent(sidebar); + } + } + }, + //Open the control sidebar + open: function (sidebar, slide) { + //Slide over content + if (slide) { + sidebar.addClass('control-sidebar-open'); + } else { + //Push the content by adding the open class to the body instead + //of the sidebar itself + $('body').addClass('control-sidebar-open'); + } + }, + //Close the control sidebar + close: function (sidebar, slide) { + if (slide) { + sidebar.removeClass('control-sidebar-open'); + } else { + $('body').removeClass('control-sidebar-open'); + } + }, + _fix: function (sidebar) { + var _this = this; + if ($("body").hasClass('layout-boxed')) { + sidebar.css('position', 'absolute'); + sidebar.height($(".wrapper").height()); + if (_this.hasBindedResize) { + return; + } + $(window).resize(function () { + _this._fix(sidebar); + }); + _this.hasBindedResize = true; + } else { + sidebar.css({ + 'position': 'fixed', + 'height': 'auto' + }); + } + }, + _fixForFixed: function (sidebar) { + sidebar.css({ + 'position': 'fixed', + 'max-height': '100%', + 'overflow': 'auto', + 'padding-bottom': '50px' + }); + }, + _fixForContent: function (sidebar) { + $(".content-wrapper, .right-side").css('min-height', sidebar.height()); } - return; - } else if (typeof $.fn.slimScroll == 'undefined' && window.console) { - window.console.error("Error: the fixed layout requires the slimscroll plugin!"); - } - //Enable slimscroll for fixed layout - if ($.AdminLTE.options.sidebarSlimScroll) { - if (typeof $.fn.slimScroll != 'undefined') { - //Destroy if it exists - $(".sidebar").slimScroll({destroy: true}).height("auto"); - //Add slimscroll - $(".sidebar").slimscroll({ - height: ($(window).height() - $(".main-header").height()) + "px", - color: "rgba(0,0,0,0.2)", - size: "3px" - }); - } - } - } - }; - - /* PushMenu() - * ========== - * Adds the push menu functionality to the sidebar. - * - * @type Function - * @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']") - */ - $.AdminLTE.pushMenu = { - activate: function (toggleBtn) { - //Get the screen sizes - var screenSizes = $.AdminLTE.options.screenSizes; - - //Enable sidebar toggle - $(document).on('click', toggleBtn, function (e) { - e.preventDefault(); - - //Enable sidebar push menu - if ($(window).width() > (screenSizes.sm - 1)) { - if ($("body").hasClass('sidebar-collapse')) { - $("body").removeClass('sidebar-collapse').trigger('expanded.pushMenu'); - } else { - $("body").addClass('sidebar-collapse').trigger('collapsed.pushMenu'); - } + }; + + /* BoxWidget + * ========= + * BoxWidget is a plugin to handle collapsing and + * removing boxes from the screen. + * + * @type Object + * @usage $.AdminLTE.boxWidget.activate() + * Set all your options in the main $.AdminLTE.options object + */ + $.AdminLTE.boxWidget = { + selectors: $.AdminLTE.options.boxWidgetOptions.boxWidgetSelectors, + icons: $.AdminLTE.options.boxWidgetOptions.boxWidgetIcons, + animationSpeed: $.AdminLTE.options.animationSpeed, + activate: function (_box) { + var _this = this; + if (!_box) { + _box = document; // activate all boxes per default + } + //Listen for collapse event triggers + $(_box).on('click', _this.selectors.collapse, function (e) { + e.preventDefault(); + _this.collapse($(this)); + }); + + //Listen for remove event triggers + $(_box).on('click', _this.selectors.remove, function (e) { + e.preventDefault(); + _this.remove($(this)); + }); + }, + collapse: function (element) { + var _this = this; + //Find the box parent + var box = element.parents(".box").first(); + //Find the body and the footer + var box_content = box.find("> .box-body, > .box-footer, > form >.box-body, > form > .box-footer"); + if (!box.hasClass("collapsed-box")) { + //Convert minus into plus + element.children(":first") + .removeClass(_this.icons.collapse) + .addClass(_this.icons.open); + //Hide the content + box_content.slideUp(_this.animationSpeed, function () { + box.addClass("collapsed-box"); + }); + } else { + //Convert plus into minus + element.children(":first") + .removeClass(_this.icons.open) + .addClass(_this.icons.collapse); + //Show the content + box_content.slideDown(_this.animationSpeed, function () { + box.removeClass("collapsed-box"); + }); + } + }, + remove: function (element) { + //Find the box parent + var box = element.parents(".box").first(); + box.slideUp(this.animationSpeed); } - //Handle sidebar push menu for small screens - else { - if ($("body").hasClass('sidebar-open')) { - $("body").removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu'); - } else { - $("body").addClass('sidebar-open').trigger('expanded.pushMenu'); - } - } - }); - - $(".content-wrapper").click(function () { - //Enable hide menu when clicking on the content-wrapper on small screens - if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) { - $("body").removeClass('sidebar-open'); - } - }); - - //Enable expand on hover for sidebar mini - if ($.AdminLTE.options.sidebarExpandOnHover - || ($('body').hasClass('fixed') - && $('body').hasClass('sidebar-mini'))) { - this.expandOnHover(); - } - }, - expandOnHover: function () { - var _this = this; - var screenWidth = $.AdminLTE.options.screenSizes.sm - 1; - //Expand sidebar on hover - $('.main-sidebar').hover(function () { - if ($('body').hasClass('sidebar-mini') - && $("body").hasClass('sidebar-collapse') - && $(window).width() > screenWidth) { - _this.expand(); - } - }, function () { - if ($('body').hasClass('sidebar-mini') - && $('body').hasClass('sidebar-expanded-on-hover') - && $(window).width() > screenWidth) { - _this.collapse(); - } - }); - }, - expand: function () { - $("body").removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover'); - }, - collapse: function () { - if ($('body').hasClass('sidebar-expanded-on-hover')) { - $('body').removeClass('sidebar-expanded-on-hover').addClass('sidebar-collapse'); - } - } - }; - - /* Tree() - * ====== - * Converts the sidebar into a multilevel - * tree view menu. - * - * @type Function - * @Usage: $.AdminLTE.tree('.sidebar') - */ - $.AdminLTE.tree = function (menu) { - var _this = this; - var animationSpeed = $.AdminLTE.options.animationSpeed; - $(document).off('click', menu + ' li a') - .on('click', menu + ' li a', function (e) { - //Get the clicked link and the next element - var $this = $(this); - var checkElement = $this.next(); - - //Check if the next element is a menu and is visible - if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) { - //Close the menu - checkElement.slideUp(animationSpeed, function () { - checkElement.removeClass('menu-open'); - //Fix the layout in case the sidebar stretches over the height of the window - //_this.layout.fix(); - }); - checkElement.parent("li").removeClass("active"); - } - //If the menu is not visible - else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) { - //Get the parent menu - var parent = $this.parents('ul').first(); - //Close all open menus within the parent - var ul = parent.find('ul:visible').slideUp(animationSpeed); - //Remove the menu-open class from the parent - ul.removeClass('menu-open'); - //Get the parent li - var parent_li = $this.parent("li"); - - //Open the target menu and add the menu-open class - checkElement.slideDown(animationSpeed, function () { - //Add the class active to the parent li - checkElement.addClass('menu-open'); - parent.find('li.active').removeClass('active'); - parent_li.addClass('active'); - //Fix the layout in case the sidebar stretches over the height of the window - _this.layout.fix(); - }); - } - //if this isn't a link, prevent the page from being redirected - if (checkElement.is('.treeview-menu')) { - e.preventDefault(); - } - }); - }; - - /* ControlSidebar - * ============== - * Adds functionality to the right sidebar - * - * @type Object - * @usage $.AdminLTE.controlSidebar.activate(options) - */ - $.AdminLTE.controlSidebar = { - //instantiate the object - activate: function () { - //Get the object - var _this = this; - //Update options - var o = $.AdminLTE.options.controlSidebarOptions; - //Get the sidebar - var sidebar = $(o.selector); - //The toggle button - var btn = $(o.toggleBtnSelector); - - //Listen to the click event - btn.on('click', function (e) { - e.preventDefault(); - //If the sidebar is not open - if (!sidebar.hasClass('control-sidebar-open') - && !$('body').hasClass('control-sidebar-open')) { - //Open the sidebar - _this.open(sidebar, o.slide); - } else { - _this.close(sidebar, o.slide); - } - }); - - //If the body has a boxed layout, fix the sidebar bg position - var bg = $(".control-sidebar-bg"); - _this._fix(bg); - - //If the body has a fixed layout, make the control sidebar fixed - if ($('body').hasClass('fixed')) { - _this._fixForFixed(sidebar); - } else { - //If the content height is less than the sidebar's height, force max height - if ($('.content-wrapper, .right-side').height() < sidebar.height()) { - _this._fixForContent(sidebar); - } - } - }, - //Open the control sidebar - open: function (sidebar, slide) { - //Slide over content - if (slide) { - sidebar.addClass('control-sidebar-open'); - } else { - //Push the content by adding the open class to the body instead - //of the sidebar itself - $('body').addClass('control-sidebar-open'); - } - }, - //Close the control sidebar - close: function (sidebar, slide) { - if (slide) { - sidebar.removeClass('control-sidebar-open'); - } else { - $('body').removeClass('control-sidebar-open'); - } - }, - _fix: function (sidebar) { - var _this = this; - if ($("body").hasClass('layout-boxed')) { - sidebar.css('position', 'absolute'); - sidebar.height($(".wrapper").height()); - if (_this.hasBindedResize) { - return; - } - $(window).resize(function () { - _this._fix(sidebar); - }); - _this.hasBindedResize = true; - } else { - sidebar.css({ - 'position': 'fixed', - 'height': 'auto' - }); - } - }, - _fixForFixed: function (sidebar) { - sidebar.css({ - 'position': 'fixed', - 'max-height': '100%', - 'overflow': 'auto', - 'padding-bottom': '50px' - }); - }, - _fixForContent: function (sidebar) { - $(".content-wrapper, .right-side").css('min-height', sidebar.height()); - } - }; - - /* BoxWidget - * ========= - * BoxWidget is a plugin to handle collapsing and - * removing boxes from the screen. - * - * @type Object - * @usage $.AdminLTE.boxWidget.activate() - * Set all your options in the main $.AdminLTE.options object - */ - $.AdminLTE.boxWidget = { - selectors: $.AdminLTE.options.boxWidgetOptions.boxWidgetSelectors, - icons: $.AdminLTE.options.boxWidgetOptions.boxWidgetIcons, - animationSpeed: $.AdminLTE.options.animationSpeed, - activate: function (_box) { - var _this = this; - if (!_box) { - _box = document; // activate all boxes per default - } - //Listen for collapse event triggers - $(_box).on('click', _this.selectors.collapse, function (e) { - e.preventDefault(); - _this.collapse($(this)); - }); - - //Listen for remove event triggers - $(_box).on('click', _this.selectors.remove, function (e) { - e.preventDefault(); - _this.remove($(this)); - }); - }, - collapse: function (element) { - var _this = this; - //Find the box parent - var box = element.parents(".box").first(); - //Find the body and the footer - var box_content = box.find("> .box-body, > .box-footer, > form >.box-body, > form > .box-footer"); - if (!box.hasClass("collapsed-box")) { - //Convert minus into plus - element.children(":first") - .removeClass(_this.icons.collapse) - .addClass(_this.icons.open); - //Hide the content - box_content.slideUp(_this.animationSpeed, function () { - box.addClass("collapsed-box"); - }); - } else { - //Convert plus into minus - element.children(":first") - .removeClass(_this.icons.open) - .addClass(_this.icons.collapse); - //Show the content - box_content.slideDown(_this.animationSpeed, function () { - box.removeClass("collapsed-box"); - }); - } - }, - remove: function (element) { - //Find the box parent - var box = element.parents(".box").first(); - box.slideUp(this.animationSpeed); - } - }; + }; } /* ------------------ @@ -610,70 +610,70 @@ function _init() { */ (function ($) { - "use strict"; - - $.fn.boxRefresh = function (options) { - - // Render options - var settings = $.extend({ - //Refresh button selector - trigger: ".refresh-btn", - //File source to be loaded (e.g: ajax/src.php) - source: "", - //Callbacks - onLoadStart: function (box) { - return box; - }, //Right after the button has been clicked - onLoadDone: function (box) { - return box; - } //When the source has been loaded - - }, options); - - //The overlay - var overlay = $('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>'); - - return this.each(function () { - //if a source is specified - if (settings.source === "") { - if (window.console) { - window.console.log("Please specify a source first - boxRefresh()"); - } - return; - } - //the box - var box = $(this); - //the button - var rBtn = box.find(settings.trigger).first(); - - //On trigger click - rBtn.on('click', function (e) { - e.preventDefault(); - //Add loading overlay - start(box); - - //Perform ajax call - box.find(".box-body").load(settings.source, function () { - done(box); + "use strict"; + + $.fn.boxRefresh = function (options) { + + // Render options + var settings = $.extend({ + //Refresh button selector + trigger: ".refresh-btn", + //File source to be loaded (e.g: ajax/src.php) + source: "", + //Callbacks + onLoadStart: function (box) { + return box; + }, //Right after the button has been clicked + onLoadDone: function (box) { + return box; + } //When the source has been loaded + + }, options); + + //The overlay + var overlay = $('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>'); + + return this.each(function () { + //if a source is specified + if (settings.source === "") { + if (window.console) { + window.console.log("Please specify a source first - boxRefresh()"); + } + return; + } + //the box + var box = $(this); + //the button + var rBtn = box.find(settings.trigger).first(); + + //On trigger click + rBtn.on('click', function (e) { + e.preventDefault(); + //Add loading overlay + start(box); + + //Perform ajax call + box.find(".box-body").load(settings.source, function () { + done(box); + }); + }); }); - }); - }); - function start(box) { - //Add overlay and loading img - box.append(overlay); + function start(box) { + //Add overlay and loading img + box.append(overlay); - settings.onLoadStart.call(box); - } + settings.onLoadStart.call(box); + } - function done(box) { - //Remove overlay and loading img - box.find(overlay).remove(); + function done(box) { + //Remove overlay and loading img + box.find(overlay).remove(); - settings.onLoadDone.call(box); - } + settings.onLoadDone.call(box); + } - }; + }; })(jQuery); @@ -690,21 +690,21 @@ function _init() { */ (function ($) { - 'use strict'; + 'use strict'; - $.fn.activateBox = function () { - $.AdminLTE.boxWidget.activate(this); - }; + $.fn.activateBox = function () { + $.AdminLTE.boxWidget.activate(this); + }; - $.fn.toggleBox = function () { - var button = $($.AdminLTE.boxWidget.selectors.collapse, this); - $.AdminLTE.boxWidget.collapse(button); - }; + $.fn.toggleBox = function () { + var button = $($.AdminLTE.boxWidget.selectors.collapse, this); + $.AdminLTE.boxWidget.collapse(button); + }; - $.fn.removeBox = function () { - var button = $($.AdminLTE.boxWidget.selectors.remove, this); - $.AdminLTE.boxWidget.remove(button); - }; + $.fn.removeBox = function () { + var button = $($.AdminLTE.boxWidget.selectors.remove, this); + $.AdminLTE.boxWidget.remove(button); + }; })(jQuery); @@ -718,46 +718,46 @@ function _init() { */ (function ($) { - 'use strict'; - - $.fn.todolist = function (options) { - // Render options - var settings = $.extend({ - //When the user checks the input - onCheck: function (ele) { - return ele; - }, - //When the user unchecks the input - onUncheck: function (ele) { - return ele; - } - }, options); - - return this.each(function () { - - if (typeof $.fn.iCheck != 'undefined') { - $('input', this).on('ifChecked', function () { - var ele = $(this).parents("li").first(); - ele.toggleClass("done"); - settings.onCheck.call(ele); + 'use strict'; + + $.fn.todolist = function (options) { + // Render options + var settings = $.extend({ + //When the user checks the input + onCheck: function (ele) { + return ele; + }, + //When the user unchecks the input + onUncheck: function (ele) { + return ele; + } + }, options); + + return this.each(function () { + + if (typeof $.fn.iCheck != 'undefined') { + $('input', this).on('ifChecked', function () { + var ele = $(this).parents("li").first(); + ele.toggleClass("done"); + settings.onCheck.call(ele); + }); + + $('input', this).on('ifUnchecked', function () { + var ele = $(this).parents("li").first(); + ele.toggleClass("done"); + settings.onUncheck.call(ele); + }); + } else { + $('input', this).on('change', function () { + var ele = $(this).parents("li").first(); + ele.toggleClass("done"); + if ($('input', ele).is(":checked")) { + settings.onCheck.call(ele); + } else { + settings.onUncheck.call(ele); + } + }); + } }); - - $('input', this).on('ifUnchecked', function () { - var ele = $(this).parents("li").first(); - ele.toggleClass("done"); - settings.onUncheck.call(ele); - }); - } else { - $('input', this).on('change', function () { - var ele = $(this).parents("li").first(); - ele.toggleClass("done"); - if ($('input', ele).is(":checked")) { - settings.onCheck.call(ele); - } else { - settings.onUncheck.call(ele); - } - }); - } - }); - }; + }; }(jQuery)); diff --git a/main/app/sprinkles/core/assets/userfrosting/js/attrchange.js b/main/app/sprinkles/core/assets/userfrosting/js/attrchange.js index 00878d3..df22df7 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/attrchange.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/attrchange.js @@ -7,118 +7,126 @@ Copyright (C) 2013-2014 Selvakumar Arumugam You may use attrchange plugin under the terms of the MIT Licese. https://github.com/meetselva/attrchange/blob/master/MIT-License.txt */ -(function($) { - function isDOMAttrModifiedSupported() { - var p = document.createElement('p'); - var flag = false; +(function ($) { + function isDOMAttrModifiedSupported() { + var p = document.createElement('p'); + var flag = false; - if (p.addEventListener) { - p.addEventListener('DOMAttrModified', function() { - flag = true - }, false); - } else if (p.attachEvent) { - p.attachEvent('onDOMAttrModified', function() { - flag = true - }); - } else { return false; } - p.setAttribute('id', 'target'); - return flag; - } + if (p.addEventListener) { + p.addEventListener('DOMAttrModified', function () { + flag = true + }, false); + } else if (p.attachEvent) { + p.attachEvent('onDOMAttrModified', function () { + flag = true + }); + } else { + return false; + } + p.setAttribute('id', 'target'); + return flag; + } - function checkAttributes(chkAttr, e) { - if (chkAttr) { - var attributes = this.data('attr-old-value'); + function checkAttributes(chkAttr, e) { + if (chkAttr) { + var attributes = this.data('attr-old-value'); - if (e.attributeName.indexOf('style') >= 0) { - if (!attributes['style']) - attributes['style'] = {}; //initialize - var keys = e.attributeName.split('.'); - e.attributeName = keys[0]; - e.oldValue = attributes['style'][keys[1]]; //old value - e.newValue = keys[1] + ':' - + this.prop("style")[$.camelCase(keys[1])]; //new value - attributes['style'][keys[1]] = e.newValue; - } else { - e.oldValue = attributes[e.attributeName]; - e.newValue = this.attr(e.attributeName); - attributes[e.attributeName] = e.newValue; - } + if (e.attributeName.indexOf('style') >= 0) { + if (!attributes['style']) + attributes['style'] = {}; //initialize + var keys = e.attributeName.split('.'); + e.attributeName = keys[0]; + e.oldValue = attributes['style'][keys[1]]; //old value + e.newValue = keys[1] + ':' + + this.prop("style")[$.camelCase(keys[1])]; //new value + attributes['style'][keys[1]] = e.newValue; + } else { + e.oldValue = attributes[e.attributeName]; + e.newValue = this.attr(e.attributeName); + attributes[e.attributeName] = e.newValue; + } - this.data('attr-old-value', attributes); //update the old value object - } - } + this.data('attr-old-value', attributes); //update the old value object + } + } - //initialize Mutation Observer - var MutationObserver = window.MutationObserver - || window.WebKitMutationObserver; + //initialize Mutation Observer + var MutationObserver = window.MutationObserver + || window.WebKitMutationObserver; - $.fn.attrchange = function(a, b) { - if (typeof a == 'object') {//core - var cfg = { - trackValues : false, - callback : $.noop - }; - //backward compatibility - if (typeof a === "function") { cfg.callback = a; } else { $.extend(cfg, a); } + $.fn.attrchange = function (a, b) { + if (typeof a == 'object') {//core + var cfg = { + trackValues: false, + callback: $.noop + }; + //backward compatibility + if (typeof a === "function") { + cfg.callback = a; + } else { + $.extend(cfg, a); + } - if (cfg.trackValues) { //get attributes old value - this.each(function(i, el) { - var attributes = {}; - for ( var attr, i = 0, attrs = el.attributes, l = attrs.length; i < l; i++) { - attr = attrs.item(i); - attributes[attr.nodeName] = attr.value; - } - $(this).data('attr-old-value', attributes); - }); - } + if (cfg.trackValues) { //get attributes old value + this.each(function (i, el) { + var attributes = {}; + for (var attr, i = 0, attrs = el.attributes, l = attrs.length; i < l; i++) { + attr = attrs.item(i); + attributes[attr.nodeName] = attr.value; + } + $(this).data('attr-old-value', attributes); + }); + } - if (MutationObserver) { //Modern Browsers supporting MutationObserver - var mOptions = { - subtree : false, - attributes : true, - attributeOldValue : cfg.trackValues - }; - var observer = new MutationObserver(function(mutations) { - mutations.forEach(function(e) { - var _this = e.target; - //get new value if trackValues is true - if (cfg.trackValues) { - e.newValue = $(_this).attr(e.attributeName); - } - if ($(_this).data('attrchange-status') === 'connected') { //execute if connected - cfg.callback.call(_this, e); - } - }); - }); + if (MutationObserver) { //Modern Browsers supporting MutationObserver + var mOptions = { + subtree: false, + attributes: true, + attributeOldValue: cfg.trackValues + }; + var observer = new MutationObserver(function (mutations) { + mutations.forEach(function (e) { + var _this = e.target; + //get new value if trackValues is true + if (cfg.trackValues) { + e.newValue = $(_this).attr(e.attributeName); + } + if ($(_this).data('attrchange-status') === 'connected') { //execute if connected + cfg.callback.call(_this, e); + } + }); + }); - return this.data('attrchange-method', 'Mutation Observer').data('attrchange-status', 'connected') - .data('attrchange-obs', observer).each(function() { - observer.observe(this, mOptions); - }); - } else if (isDOMAttrModifiedSupported()) { //Opera - //Good old Mutation Events - return this.data('attrchange-method', 'DOMAttrModified').data('attrchange-status', 'connected').on('DOMAttrModified', function(event) { - if (event.originalEvent) { event = event.originalEvent; }//jQuery normalization is not required - event.attributeName = event.attrName; //property names to be consistent with MutationObserver - event.oldValue = event.prevValue; //property names to be consistent with MutationObserver - if ($(this).data('attrchange-status') === 'connected') { //disconnected logically - cfg.callback.call(this, event); - } - }); - } else if ('onpropertychange' in document.body) { //works only in IE - return this.data('attrchange-method', 'propertychange').data('attrchange-status', 'connected').on('propertychange', function(e) { - e.attributeName = window.event.propertyName; - //to set the attr old value - checkAttributes.call($(this), cfg.trackValues, e); - if ($(this).data('attrchange-status') === 'connected') { //disconnected logically - cfg.callback.call(this, e); - } - }); - } - return this; - } else if (typeof a == 'string' && $.fn.attrchange.hasOwnProperty('extensions') && - $.fn.attrchange['extensions'].hasOwnProperty(a)) { //extensions/options - return $.fn.attrchange['extensions'][a].call(this, b); - } - } + return this.data('attrchange-method', 'Mutation Observer').data('attrchange-status', 'connected') + .data('attrchange-obs', observer).each(function () { + observer.observe(this, mOptions); + }); + } else if (isDOMAttrModifiedSupported()) { //Opera + //Good old Mutation Events + return this.data('attrchange-method', 'DOMAttrModified').data('attrchange-status', 'connected').on('DOMAttrModified', function (event) { + if (event.originalEvent) { + event = event.originalEvent; + }//jQuery normalization is not required + event.attributeName = event.attrName; //property names to be consistent with MutationObserver + event.oldValue = event.prevValue; //property names to be consistent with MutationObserver + if ($(this).data('attrchange-status') === 'connected') { //disconnected logically + cfg.callback.call(this, event); + } + }); + } else if ('onpropertychange' in document.body) { //works only in IE + return this.data('attrchange-method', 'propertychange').data('attrchange-status', 'connected').on('propertychange', function (e) { + e.attributeName = window.event.propertyName; + //to set the attr old value + checkAttributes.call($(this), cfg.trackValues, e); + if ($(this).data('attrchange-status') === 'connected') { //disconnected logically + cfg.callback.call(this, e); + } + }); + } + return this; + } else if (typeof a == 'string' && $.fn.attrchange.hasOwnProperty('extensions') && + $.fn.attrchange['extensions'].hasOwnProperty(a)) { //extensions/options + return $.fn.attrchange['extensions'][a].call(this, b); + } + } })(jQuery);
\ No newline at end of file diff --git a/main/app/sprinkles/core/assets/userfrosting/js/fortress-jqueryvalidation-methods.js b/main/app/sprinkles/core/assets/userfrosting/js/fortress-jqueryvalidation-methods.js index b008cf2..d92ab38 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/fortress-jqueryvalidation-methods.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/fortress-jqueryvalidation-methods.js @@ -1,4 +1,4 @@ -$.validator.addMethod("equals", function(value, element, params) { +$.validator.addMethod("equals", function (value, element, params) { params = $.extend( true, // deep extend { @@ -10,10 +10,10 @@ $.validator.addMethod("equals", function(value, element, params) { params.value = params.value.toLowerCase(); value = value.toLowerCase(); } - return this.optional(element) || value == params.value; + return this.optional(element) || value == params.value; }, "Value is not correct."); -$.validator.addMethod("notEquals", function(value, element, params) { +$.validator.addMethod("notEquals", function (value, element, params) { params = $.extend( true, // deep extend { @@ -25,33 +25,33 @@ $.validator.addMethod("notEquals", function(value, element, params) { params.value = params.value.toLowerCase(); value = value.toLowerCase(); } - return this.optional(element) || value != params.value; + return this.optional(element) || value != params.value; }, "Value is not correct."); -$.validator.addMethod("noLeadingWhitespace", function(value, element) { - return this.optional(element) || /^\S.*$/i.test(value); +$.validator.addMethod("noLeadingWhitespace", function (value, element) { + return this.optional(element) || /^\S.*$/i.test(value); }, "No leading whitespace allowed"); -$.validator.addMethod("noTrailingWhitespace", function(value, element) { - return this.optional(element) || /^.*\S$/i.test(value); +$.validator.addMethod("noTrailingWhitespace", function (value, element) { + return this.optional(element) || /^.*\S$/i.test(value); }, "No trailing whitespace allowed"); -jQuery.validator.addMethod("memberOf", function(value, element, arr) { +jQuery.validator.addMethod("memberOf", function (value, element, arr) { return $.inArray(value, arr) != -1; }, "Data provided must match one of the provided options."); -jQuery.validator.addMethod("notMemberOf", function(value, element, arr) { +jQuery.validator.addMethod("notMemberOf", function (value, element, arr) { return $.inArray(value, arr) == -1; }, "Data provided must NOT match one of the provided options."); -jQuery.validator.addMethod("matchFormField", function(value, element, field) { +jQuery.validator.addMethod("matchFormField", function (value, element, field) { return value === $(element).closest('form').find("input[name=" + field + "]").val(); }, "The specified fields must match."); -jQuery.validator.addMethod("notMatchFormField", function(value, element, field) { +jQuery.validator.addMethod("notMatchFormField", function (value, element, field) { return value !== $(element).closest('form').find("input[name=" + field + "]").val(); }, "The specified fields must NOT match."); -$.validator.addMethod("username", function(value, element) { - return this.optional(element) || /^([a-z0-9\.\-_])+$/.test(value); +$.validator.addMethod("username", function (value, element) { + return this.optional(element) || /^([a-z0-9\.\-_])+$/.test(value); }, "The field may only contain lowercase letters, digits, '.', '-', and '_'."); diff --git a/main/app/sprinkles/core/assets/userfrosting/js/handlebars-helpers.js b/main/app/sprinkles/core/assets/userfrosting/js/handlebars-helpers.js index 96f47bb..60d71ea 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/handlebars-helpers.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/handlebars-helpers.js @@ -4,10 +4,10 @@ * @see http://handlebarsjs.com/#helpers */ - /** - * Improved comparison operator - * See https://stackoverflow.com/a/16315366/2970321 - */ +/** + * Improved comparison operator + * See https://stackoverflow.com/a/16315366/2970321 + */ Handlebars.registerHelper('ifx', function (v1, operator, v2, options) { switch (operator) { case '==': @@ -37,7 +37,7 @@ Handlebars.registerHelper('ifx', function (v1, operator, v2, options) { /** * Perform simple calculations. - * + * * usage: {{calc x '+' 2}} */ Handlebars.registerHelper('calc', function (v1, operator, v2, options) { @@ -55,12 +55,12 @@ Handlebars.registerHelper('calc', function (v1, operator, v2, options) { /** * format an ISO date using Moment.js - * + * * moment syntax example: moment(Date("2011-07-18T15:50:52")).format("MMMM YYYY") * usage: {{dateFormat creation_date format="MMMM YYYY"}} * @requires momentjs http://momentjs.com/ */ -Handlebars.registerHelper('dateFormat', function(context, block) { +Handlebars.registerHelper('dateFormat', function (context, block) { if (window.moment) { var f = block.hash.format || "MMM Do, YYYY"; return moment(context).format(f); @@ -74,19 +74,19 @@ Handlebars.registerHelper('dateFormat', function(context, block) { /** * Format a phone number. */ -Handlebars.registerHelper("phoneUSFormat", function(phoneNumber) { - if (typeof phoneNumber === 'undefined') { - return ''; - } +Handlebars.registerHelper("phoneUSFormat", function (phoneNumber) { + if (typeof phoneNumber === 'undefined') { + return ''; + } - phoneNumber = phoneNumber.toString(); - return "(" + phoneNumber.substr(0,3) + ") " + phoneNumber.substr(3,3) + "-" + phoneNumber.substr(6,4); + phoneNumber = phoneNumber.toString(); + return "(" + phoneNumber.substr(0, 3) + ") " + phoneNumber.substr(3, 3) + "-" + phoneNumber.substr(6, 4); }); /** * Format currency (USD). */ -Handlebars.registerHelper("currencyUsdFormat", function(amount) { +Handlebars.registerHelper("currencyUsdFormat", function (amount) { var parsedAmount = parseFloat(amount); if (parsedAmount < 0) { return "-$" + Math.abs(parsedAmount).toFixed(2); @@ -100,7 +100,7 @@ Handlebars.registerHelper("currencyUsdFormat", function(amount) { * * @requires speakingurl https://pid.github.io/speakingurl/ */ -Handlebars.registerHelper('slug', function(text) { +Handlebars.registerHelper('slug', function (text) { return getSlug(text); }); @@ -110,8 +110,8 @@ Handlebars.registerHelper('slug', function(text) { * @deprecated since 4.1 - use ifx instead * usage: {{ifCond apple orange}} */ -Handlebars.registerHelper('ifCond', function(v1, v2, options) { - if(v1 == v2) { +Handlebars.registerHelper('ifCond', function (v1, v2, options) { + if (v1 == v2) { return options.fn(this); } diff --git a/main/app/sprinkles/core/assets/userfrosting/js/query-string.js b/main/app/sprinkles/core/assets/userfrosting/js/query-string.js index 5e0d780..ff3c88c 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/query-string.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/query-string.js @@ -17,13 +17,13 @@ $.String = $.extend($.String || {}, { * } * } */ - deparam: function(params){ + deparam: function (params) { var digitTest = /^\d+$/, keyBreaker = /([^\[\]]+)|(\[\])/g, plus = /\+/g, paramTest = /([^?#]*)(#.*)?$/; - if(! params || ! paramTest.test(params) ) { + if (!params || !paramTest.test(params)) { return {}; } @@ -32,31 +32,31 @@ $.String = $.extend($.String || {}, { pairs = params.split('&'), current; - for(var i=0; i < pairs.length; i++){ + for (var i = 0; i < pairs.length; i++) { current = data; var pair = pairs[i].split('='); // if we find foo=1+1=2 - if(pair.length != 2) { + if (pair.length != 2) { pair = [pair[0], pair.slice(1).join("=")] } - var key = decodeURIComponent(pair[0].replace(plus, " ")), - value = decodeURIComponent(pair[1].replace(plus, " ")), + var key = decodeURIComponent(pair[0].replace(plus, " ")), + value = decodeURIComponent(pair[1].replace(plus, " ")), parts = key.match(keyBreaker); - for ( var j = 0; j < parts.length - 1; j++ ) { + for (var j = 0; j < parts.length - 1; j++) { var part = parts[j]; - if (!current[part] ) { + if (!current[part]) { // if what we are pointing to looks like an array - current[part] = digitTest.test(parts[j+1]) || parts[j+1] == "[]" ? [] : {} + current[part] = digitTest.test(parts[j + 1]) || parts[j + 1] == "[]" ? [] : {} } current = current[part]; } lastPart = parts[parts.length - 1]; - if(lastPart == "[]"){ + if (lastPart == "[]") { current.push(value) - }else{ + } else { current[lastPart] = value; } } diff --git a/main/app/sprinkles/core/assets/userfrosting/js/tablesorter/widget-sort2Hash.js b/main/app/sprinkles/core/assets/userfrosting/js/tablesorter/widget-sort2Hash.js index 1be9c85..3b98529 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/tablesorter/widget-sort2Hash.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/tablesorter/widget-sort2Hash.js @@ -4,268 +4,274 @@ * * Temporary patched version of widget to handle browser history issues (#712). */ -;( function( $ ) { - 'use strict'; - var ts = $.tablesorter || {}, - s2h = ts.sort2Hash = { - init : function( c, wo ) { - var filter, temp, page, size, - table = c.table, - pager = c.pager, - hasSaveSort = ts.hasWidget( table, 'saveSort' ), - sort = s2h.decodeHash( c, wo, 'sort' ); - if ( ( sort && !hasSaveSort ) || ( sort && hasSaveSort && wo.sort2Hash_overrideSaveSort ) ) { - s2h.convertString2Sort( c, wo, sort ); - } - if ( ts.hasWidget( c.table, 'pager' ) ) { - temp = parseInt( s2h.decodeHash( c, wo, 'page' ), 10 ); - page = pager.page = ( temp < 0 ? 0 : ( temp > pager.totalPages ? pager.totalPages - 1 : temp ) ); - size = pager.size = parseInt( s2h.decodeHash( c, wo, 'size' ), 10 ); - } - if ( ts.hasWidget( table, 'filter' ) ) { - filter = s2h.decodeHash( c, wo, 'filter' ); - if ( filter ) { - filter = filter.split( wo.sort2Hash_separator ); - c.$table.one( 'tablesorter-ready', function() { - setTimeout(function(){ - c.$table.one( 'filterEnd', function() { - $(this).triggerHandler( 'pageAndSize', [ page, size ] ); - }); - // use the newest filter comparison code - if ( ts.filter.equalFilters ) { - temp = ts.filter.equalFilters( c, c.lastSearch, filter ); - } else { - // quick n' dirty comparison... it will miss filter changes of - // the same value in a different column, see #1363 - temp = ( c.lastSearch || [] ).join( '' ) !== ( filter || [] ).join( '' ); - } - // don't set filters if they haven't changed - if ( !temp ) { - $.tablesorter.setFilters( table, filter, true ); - } - }, 100 ); - }); - } - } - if ( !filter ) { - c.$table.one( 'tablesorter-ready', function() { - c.$table.triggerHandler( 'pageAndSize', [ page, size ] ); - }); - } +;(function ($) { + 'use strict'; + var ts = $.tablesorter || {}, + s2h = ts.sort2Hash = { + init: function (c, wo) { + var filter, temp, page, size, + table = c.table, + pager = c.pager, + hasSaveSort = ts.hasWidget(table, 'saveSort'), + sort = s2h.decodeHash(c, wo, 'sort'); + if ((sort && !hasSaveSort) || (sort && hasSaveSort && wo.sort2Hash_overrideSaveSort)) { + s2h.convertString2Sort(c, wo, sort); + } + if (ts.hasWidget(c.table, 'pager')) { + temp = parseInt(s2h.decodeHash(c, wo, 'page'), 10); + page = pager.page = (temp < 0 ? 0 : (temp > pager.totalPages ? pager.totalPages - 1 : temp)); + size = pager.size = parseInt(s2h.decodeHash(c, wo, 'size'), 10); + } + if (ts.hasWidget(table, 'filter')) { + filter = s2h.decodeHash(c, wo, 'filter'); + if (filter) { + filter = filter.split(wo.sort2Hash_separator); + c.$table.one('tablesorter-ready', function () { + setTimeout(function () { + c.$table.one('filterEnd', function () { + $(this).triggerHandler('pageAndSize', [page, size]); + }); + // use the newest filter comparison code + if (ts.filter.equalFilters) { + temp = ts.filter.equalFilters(c, c.lastSearch, filter); + } else { + // quick n' dirty comparison... it will miss filter changes of + // the same value in a different column, see #1363 + temp = (c.lastSearch || []).join('') !== (filter || []).join(''); + } + // don't set filters if they haven't changed + if (!temp) { + $.tablesorter.setFilters(table, filter, true); + } + }, 100); + }); + } + } + if (!filter) { + c.$table.one('tablesorter-ready', function () { + c.$table.triggerHandler('pageAndSize', [page, size]); + }); + } - c.$table.on( 'sortEnd.sort2hash filterEnd.sort2hash pagerComplete.sort2Hash', function() { - if ( this.hasInitialized ) { - s2h.setHash( this.config, this.config.widgetOptions ); - } - }); - }, + c.$table.on('sortEnd.sort2hash filterEnd.sort2hash pagerComplete.sort2Hash', function () { + if (this.hasInitialized) { + s2h.setHash(this.config, this.config.widgetOptions); + } + }); + }, - getTableId : function( c, wo ) { - // option > table id > table index on page - return wo.sort2Hash_tableId || - c.table.id || - 'table' + $( 'table' ).index( c.$table ); - }, - regexEscape : function( v ) { - return v.replace( /([\.\^\$\*\+\-\?\(\)\[\]\{\}\\\|])/g, '\\$1'); - }, - // convert 'first%20name,asc,last%20name,desc' into [[0,0], [1,1]] - convertString2Sort : function( c, wo, sortHash ) { - var regex, column, direction, temp, index, $cell, - arry = sortHash.split( wo.sort2Hash_separator ), - indx = 0, - len = arry.length, - sort = []; - while ( indx < len ) { - // column index or text - column = arry[ indx++ ]; - temp = parseInt( column, 10 ); - // ignore wo.sort2Hash_useHeaderText setting & - // just see if column contains a number - if ( isNaN( temp ) || temp > c.columns ) { - regex = new RegExp( '(' + s2h.regexEscape( column ) + ')', 'i' ); - for ( index = 0; index < c.columns; index++ ) { - $cell = c.$headerIndexed[ index ]; - if ( regex.test( $cell.attr( wo.sort2Hash_headerTextAttr ) ) ) { - column = index; - index = c.columns; - } - } - } - direction = arry[ indx++ ]; - // ignore unpaired values - if ( typeof column !== 'undefined' && typeof direction !== 'undefined' ) { - // convert text to 0, 1 - if ( isNaN( direction ) ) { - // default to ascending sort - direction = direction.indexOf( wo.sort2Hash_directionText[ 1 ] ) > -1 ? 1 : 0; - } - sort.push( [ column, direction ] ); - } - } - if ( sort.length ) { - c.sortList = sort; - } - }, + getTableId: function (c, wo) { + // option > table id > table index on page + return wo.sort2Hash_tableId || + c.table.id || + 'table' + $('table').index(c.$table); + }, + regexEscape: function (v) { + return v.replace(/([\.\^\$\*\+\-\?\(\)\[\]\{\}\\\|])/g, '\\$1'); + }, + // convert 'first%20name,asc,last%20name,desc' into [[0,0], [1,1]] + convertString2Sort: function (c, wo, sortHash) { + var regex, column, direction, temp, index, $cell, + arry = sortHash.split(wo.sort2Hash_separator), + indx = 0, + len = arry.length, + sort = []; + while (indx < len) { + // column index or text + column = arry[indx++]; + temp = parseInt(column, 10); + // ignore wo.sort2Hash_useHeaderText setting & + // just see if column contains a number + if (isNaN(temp) || temp > c.columns) { + regex = new RegExp('(' + s2h.regexEscape(column) + ')', 'i'); + for (index = 0; index < c.columns; index++) { + $cell = c.$headerIndexed[index]; + if (regex.test($cell.attr(wo.sort2Hash_headerTextAttr))) { + column = index; + index = c.columns; + } + } + } + direction = arry[indx++]; + // ignore unpaired values + if (typeof column !== 'undefined' && typeof direction !== 'undefined') { + // convert text to 0, 1 + if (isNaN(direction)) { + // default to ascending sort + direction = direction.indexOf(wo.sort2Hash_directionText[1]) > -1 ? 1 : 0; + } + sort.push([column, direction]); + } + } + if (sort.length) { + c.sortList = sort; + } + }, - // convert [[0,0],[1,1]] to 'first%20name,asc,last%20name,desc' - convertSort2String : function( c, wo ) { - var index, txt, column, direction, - sort = [], - arry = c.sortList || [], - len = arry.length; - for ( index = 0; index < len; index++ ) { - column = arry[ index ][ 0 ]; - txt = $.trim( c.$headerIndexed[ column ].attr( wo.sort2Hash_headerTextAttr ) ); - sort.push( txt !== '' ? encodeURIComponent( txt ) : column ); - direction = wo.sort2Hash_directionText[ arry[ index ][ 1 ] ]; - sort.push( direction ); - } - // join with separator - return sort.join( wo.sort2Hash_separator ); - }, + // convert [[0,0],[1,1]] to 'first%20name,asc,last%20name,desc' + convertSort2String: function (c, wo) { + var index, txt, column, direction, + sort = [], + arry = c.sortList || [], + len = arry.length; + for (index = 0; index < len; index++) { + column = arry[index][0]; + txt = $.trim(c.$headerIndexed[column].attr(wo.sort2Hash_headerTextAttr)); + sort.push(txt !== '' ? encodeURIComponent(txt) : column); + direction = wo.sort2Hash_directionText[arry[index][1]]; + sort.push(direction); + } + // join with separator + return sort.join(wo.sort2Hash_separator); + }, - convertFilter2String : function( c, wo ) { - var index, txt, column, direction, - sort = [], - arry = c.sortList || [], - len = arry.length; - for ( index = 0; index < len; index++ ) { - column = arry[ index ][ 0 ]; - txt = $.trim( c.$headerIndexed[ column ].attr( wo.sort2Hash_headerTextAttr ) ); - column = typeof txt !== 'undefined' ? encodeURIComponent( txt ) : column; - sort.push( column ); - direction = wo.sort2Hash_directionText[ arry[ index ][ 1 ] ]; - sort.push( direction ); - } - // join with separator - return sort.join( wo.sort2Hash_separator ); - }, + convertFilter2String: function (c, wo) { + var index, txt, column, direction, + sort = [], + arry = c.sortList || [], + len = arry.length; + for (index = 0; index < len; index++) { + column = arry[index][0]; + txt = $.trim(c.$headerIndexed[column].attr(wo.sort2Hash_headerTextAttr)); + column = typeof txt !== 'undefined' ? encodeURIComponent(txt) : column; + sort.push(column); + direction = wo.sort2Hash_directionText[arry[index][1]]; + sort.push(direction); + } + // join with separator + return sort.join(wo.sort2Hash_separator); + }, - // Get URL Parameters (getParam) - // modified from http://www.netlobo.com/url_query_string_javascript.html - getParam : function ( name, hash, returnRegex ) { - if ( !hash ) { hash = window.location.hash; } - var regex = new RegExp( '[\\?&]' + s2h.regexEscape( name ) + '=([^&#]*)' ), - match = regex.exec( hash ); - if ( returnRegex ) { return regex; } - return match === null ? '' : decodeURIComponent( match[ 1 ] ); - }, + // Get URL Parameters (getParam) + // modified from http://www.netlobo.com/url_query_string_javascript.html + getParam: function (name, hash, returnRegex) { + if (!hash) { + hash = window.location.hash; + } + var regex = new RegExp('[\\?&]' + s2h.regexEscape(name) + '=([^&#]*)'), + match = regex.exec(hash); + if (returnRegex) { + return regex; + } + return match === null ? '' : decodeURIComponent(match[1]); + }, - // remove parameter from hash - removeParam : function( name, hash ) { - if ( !hash ) { hash = window.location.hash; } - var index, - regex = s2h.getParam( name, hash, true ), - result = [], - parts = hash.split( '&' ), - len = parts.length; - for ( index = 0; index < len; index++ ) { - // regex expects a leading '&'... - if ( !regex.test( '&' + parts[ index ] ) ) { - result.push( parts[ index ] ); - } - } - return result.length ? result.join( '&' ) : ''; - }, + // remove parameter from hash + removeParam: function (name, hash) { + if (!hash) { + hash = window.location.hash; + } + var index, + regex = s2h.getParam(name, hash, true), + result = [], + parts = hash.split('&'), + len = parts.length; + for (index = 0; index < len; index++) { + // regex expects a leading '&'... + if (!regex.test('&' + parts[index])) { + result.push(parts[index]); + } + } + return result.length ? result.join('&') : ''; + }, - encodeHash : function( c, wo, component, value, rawValue ) { - var result = false, - tableId = s2h.getTableId( c, wo ); - if ( typeof wo.sort2Hash_encodeHash === 'function' ) { - result = wo.sort2Hash_encodeHash( c, tableId, component, value, rawValue || value ); - } - if ( result === false ) { - result = '&' + component + '[' + tableId + ']=' + value; - } - return result; - }, + encodeHash: function (c, wo, component, value, rawValue) { + var result = false, + tableId = s2h.getTableId(c, wo); + if (typeof wo.sort2Hash_encodeHash === 'function') { + result = wo.sort2Hash_encodeHash(c, tableId, component, value, rawValue || value); + } + if (result === false) { + result = '&' + component + '[' + tableId + ']=' + value; + } + return result; + }, - decodeHash : function( c, wo, component ) { - var result = false, - tableId = s2h.getTableId( c, wo ); - if ( typeof wo.sort2Hash_decodeHash === 'function' ) { - // return a string - result = wo.sort2Hash_decodeHash( c, tableId, component ); - } - if ( result === false ) { - result = s2h.getParam( component + '[' + tableId + ']' ); - } - return result || ''; - }, + decodeHash: function (c, wo, component) { + var result = false, + tableId = s2h.getTableId(c, wo); + if (typeof wo.sort2Hash_decodeHash === 'function') { + // return a string + result = wo.sort2Hash_decodeHash(c, tableId, component); + } + if (result === false) { + result = s2h.getParam(component + '[' + tableId + ']'); + } + return result || ''; + }, - cleanHash : function( c, wo, component, hash ) { - var result = false, - tableId = s2h.getTableId( c, wo ); - if ( typeof wo.sort2Hash_cleanHash === 'function' ) { - // can return an array or string - result = wo.sort2Hash_cleanHash( c, tableId, component, hash ); - } - if ( result === false ) { - // parameter example: 'sort[table0]=0,0' - result = s2h.removeParam( component + '[' + tableId + ']', hash ); - } - return result || ''; - }, + cleanHash: function (c, wo, component, hash) { + var result = false, + tableId = s2h.getTableId(c, wo); + if (typeof wo.sort2Hash_cleanHash === 'function') { + // can return an array or string + result = wo.sort2Hash_cleanHash(c, tableId, component, hash); + } + if (result === false) { + // parameter example: 'sort[table0]=0,0' + result = s2h.removeParam(component + '[' + tableId + ']', hash); + } + return result || ''; + }, - setHash : function( c, wo ) { - var str = '', - hash = window.location.hash, - hasPager = ts.hasWidget( c.table, 'pager' ), - hasFilter = ts.hasWidget( c.table, 'filter' ), - sortList = s2h.convertSort2String( c, wo ), - filters = ( hasFilter && c.lastSearch.join('') !== '' ? c.lastSearch : [] ), - filtersStr = encodeURIComponent( filters.join( c.widgetOptions.sort2Hash_separator ) ), - components = { - 'sort' : sortList ? s2h.encodeHash( c, wo, 'sort', sortList, c.sortList ) : '', - 'page' : hasPager ? s2h.encodeHash( c, wo, 'page', c.pager.page + 1 ) : '', - 'size' : hasPager ? s2h.encodeHash( c, wo, 'size', c.pager.size ) : '', - 'filter' : filtersStr ? s2h.encodeHash( c, wo, 'filter', filtersStr, filters ) : '' - }; - // remove old hash - $.each( components, function( component, value ) { - hash = s2h.cleanHash( c, wo, component, hash ); - str += value; - }); + setHash: function (c, wo) { + var str = '', + hash = window.location.hash, + hasPager = ts.hasWidget(c.table, 'pager'), + hasFilter = ts.hasWidget(c.table, 'filter'), + sortList = s2h.convertSort2String(c, wo), + filters = (hasFilter && c.lastSearch.join('') !== '' ? c.lastSearch : []), + filtersStr = encodeURIComponent(filters.join(c.widgetOptions.sort2Hash_separator)), + components = { + 'sort': sortList ? s2h.encodeHash(c, wo, 'sort', sortList, c.sortList) : '', + 'page': hasPager ? s2h.encodeHash(c, wo, 'page', c.pager.page + 1) : '', + 'size': hasPager ? s2h.encodeHash(c, wo, 'size', c.pager.size) : '', + 'filter': filtersStr ? s2h.encodeHash(c, wo, 'filter', filtersStr, filters) : '' + }; + // remove old hash + $.each(components, function (component, value) { + hash = s2h.cleanHash(c, wo, component, hash); + str += value; + }); - // Combine new hash with any existing hashes - var hashChar = c.widgetOptions.sort2Hash_hash; - var newHash = ( ( window.location.hash || '' ).replace( hashChar, '' ).length ? hash : wo.sort2Hash_hash ) + str; - var baseUrl = window.location.href.split(hashChar)[0]; - // Ensure that there is a leading hash character - var firstChar = newHash[0]; - if (firstChar != hashChar) { - newHash = hashChar + newHash; - } + // Combine new hash with any existing hashes + var hashChar = c.widgetOptions.sort2Hash_hash; + var newHash = ((window.location.hash || '').replace(hashChar, '').length ? hash : wo.sort2Hash_hash) + str; + var baseUrl = window.location.href.split(hashChar)[0]; + // Ensure that there is a leading hash character + var firstChar = newHash[0]; + if (firstChar != hashChar) { + newHash = hashChar + newHash; + } - // Update URL in browser - window.location.replace(baseUrl + newHash); - } - }; + // Update URL in browser + window.location.replace(baseUrl + newHash); + } + }; - ts.addWidget({ - id: 'sort2Hash', - priority: 60, // after saveSort & pager - options: { - sort2Hash_hash : '#', // hash prefix - sort2Hash_separator : '-', // don't '#' or '=' here - sort2Hash_headerTextAttr : 'data-header', // data attribute containing alternate header text - sort2Hash_directionText : [ 0, 1 ], // [ 'asc', 'desc' ], - sort2Hash_overrideSaveSort : false, // if true, override saveSort widget if saved sort available + ts.addWidget({ + id: 'sort2Hash', + priority: 60, // after saveSort & pager + options: { + sort2Hash_hash: '#', // hash prefix + sort2Hash_separator: '-', // don't '#' or '=' here + sort2Hash_headerTextAttr: 'data-header', // data attribute containing alternate header text + sort2Hash_directionText: [0, 1], // [ 'asc', 'desc' ], + sort2Hash_overrideSaveSort: false, // if true, override saveSort widget if saved sort available - // this option > table ID > table index on page - sort2Hash_tableId : null, - // custom hash processing functions - sort2Hash_encodeHash : null, - sort2Hash_decodeHash : null, - sort2Hash_cleanHash : null - }, - init: function(table, thisWidget, c, wo) { - s2h.init( c, wo ); - }, - remove: function(table, c) { - c.$table.off( '.sort2hash' ); - } - }); + // this option > table ID > table index on page + sort2Hash_tableId: null, + // custom hash processing functions + sort2Hash_encodeHash: null, + sort2Hash_decodeHash: null, + sort2Hash_cleanHash: null + }, + init: function (table, thisWidget, c, wo) { + s2h.init(c, wo); + }, + remove: function (table, c) { + c.$table.off('.sort2hash'); + } + }); })(jQuery); diff --git a/main/app/sprinkles/core/assets/userfrosting/js/uf-captcha.js b/main/app/sprinkles/core/assets/userfrosting/js/uf-captcha.js index ed3ecea..a027f9c 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/uf-captcha.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/uf-captcha.js @@ -1,8 +1,8 @@ /** * This plugin reloads the captcha in the specified element. */ -(function( $ ) { - $.fn.captcha = function() { +(function ($) { + $.fn.captcha = function () { // Set the new captcha image $(this).attr('src', site.uri.public + "/account/captcha?" + new Date().getTime()); @@ -10,4 +10,4 @@ var target = $(this).data('target'); $(target).val(""); }; -}( jQuery )); +}(jQuery)); diff --git a/main/app/sprinkles/core/assets/userfrosting/js/uf-collection.js b/main/app/sprinkles/core/assets/userfrosting/js/uf-collection.js index a2afc6e..8146f3f 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/uf-collection.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/uf-collection.js @@ -32,26 +32,26 @@ * UserFrosting https://www.userfrosting.com * @author Alexander Weissman <https://alexanderweissman.com> */ -;(function($, window, document, undefined) { - "use strict"; +;(function ($, window, document, undefined) { + "use strict"; // Define plugin name and defaults. var pluginName = "ufCollection", defaults = { useDropdown: true, dropdown: { - ajax : { - url : "", - dataType : "json", - delay : 250, - data : function (params) { + ajax: { + url: "", + dataType: "json", + delay: 250, + data: function (params) { return { filters: { - info : params.term + info: params.term } }; }, - processResults : function (data, params) { + processResults: function (data, params) { // Process the data into dropdown options var suggestions = []; if (data && data.rows) { @@ -61,25 +61,25 @@ results: suggestions }; }, - cache : true + cache: true }, - placeholder : "Item", - selectOnClose : false, // Make a selection when they click out of the box/press the next button - theme : "default", - width : "100%", + placeholder: "Item", + selectOnClose: false, // Make a selection when they click out of the box/press the next button + theme: "default", + width: "100%", }, transformDropdownSelection: function (item) { return item; }, - dropdownControl : null, + dropdownControl: null, dropdownTemplate: "", - rowContainer : null, - rowTemplate : "", - DEBUG : false - }; + rowContainer: null, + rowTemplate: "", + DEBUG: false + }; // Constructor - function Plugin (element, options) { + function Plugin(element, options) { this.element = element[0]; this.$element = $(this.element); var lateDefaults = { @@ -91,7 +91,11 @@ this._name = pluginName; // Detect changes to element attributes - this.$element.attrchange({ callback: function (event) { this.element = event.target; }.bind(this) }); + this.$element.attrchange({ + callback: function (event) { + this.element = event.target; + }.bind(this) + }); // Internal counter for adding rows to the collection. Gets updated every time `_createRow` is called. this._rownum = 0; @@ -108,7 +112,7 @@ this.$element.toggleClass("uf-collection", true); // Add bindings for any rows already present in the DOM - $.each(this.settings.rowContainer.find('.uf-collection-row'), $.proxy(function(idx, row) { + $.each(this.settings.rowContainer.find('.uf-collection-row'), $.proxy(function (idx, row) { this._onNewRow($(row)); this._lastRow = row; }, this)); @@ -117,7 +121,7 @@ if (this.settings.useDropdown) { this._initDropdownField(this.settings.dropdownControl); - this.settings.dropdownControl.on("select2:select", $.proxy(function(e) { + this.settings.dropdownControl.on("select2:select", $.proxy(function (e) { var item = $(e.target).select2("data")[0]; // Apply any transformations before rendering as a row var transformed = this.settings.transformDropdownSelection(item); @@ -137,7 +141,7 @@ /** * Add a new row to the collection, optionally passing in prepopulated template data. */ - addRow: function(options) { + addRow: function (options) { // Grab params, if any var params = {}; if (typeof options !== 'undefined') { @@ -153,7 +157,7 @@ * Virgin rows are rows that have not yet been brought into focus by the user. * When a virgin row is brought into focus, it loses its virgin status and a new virgin row is created. */ - addVirginRow: function(options) { + addVirginRow: function (options) { // Grab params, if any var params = {}; if (typeof options !== 'undefined') { @@ -167,7 +171,7 @@ /** * Delete a target row. */ - deleteRow: function(row) { + deleteRow: function (row) { this._deleteRow(row); return this.$element; @@ -175,7 +179,7 @@ /** * Get the dropdown control for the collection, if one exists. */ - getDropdown: function() { + getDropdown: function () { return this.settings.dropdownControl; }, /** @@ -187,7 +191,7 @@ /** * Touch a target row. */ - touchRow: function(row) { + touchRow: function (row) { this._touchRow(row); return this.$element; @@ -195,12 +199,12 @@ /** * Create a new row and attach the handler for deletion to the js-delete-row button */ - _createRow: function(params) { + _createRow: function (params) { params = $.extend(true, - { - id: "", - rownum: this._rownum - }, params); + { + id: "", + rownum: this._rownum + }, params); // Generate the row and append to table var newRowTemplate = this._rowTemplateCompiled(params), @@ -224,7 +228,7 @@ /** * Create a new, blank row with the 'virgin' status. */ - _createVirginRow: function(params) { + _createVirginRow: function (params) { // Generate the row and append to table var newRow = this._createRow(params); @@ -237,21 +241,21 @@ /** * Delete a row from the collection. */ - _deleteRow: function(row) { - row.remove(); - this.$element.trigger('rowDelete.ufCollection'); - }, - /** + _deleteRow: function (row) { + row.remove(); + this.$element.trigger('rowDelete.ufCollection'); + }, + /** * Add delete and touch bindings for a row, increment the internal row counter, and fire the rowAdd event */ - _onNewRow: function(row) { + _onNewRow: function (row) { // Trigger to delete row - row.find('.js-delete-row').on('click', $.proxy(function(e) { + row.find('.js-delete-row').on('click', $.proxy(function (e) { this._deleteRow($(e.target).closest('.uf-collection-row')); }, this)); // Once the new row comes into focus for the first time, it has been "touched" - row.find(':input').on('focus', $.proxy(function() { + row.find(':input').on('focus', $.proxy(function () { this._touchRow(row); }, this)); @@ -263,7 +267,7 @@ /** * Remove a row's virgin status, show the delete button, and add a new virgin row if needed */ - _touchRow: function(row) { + _touchRow: function (row) { row.removeClass('uf-collection-row-virgin'); row.find('.js-delete-row').show(); @@ -280,11 +284,11 @@ /** * Initialize the select2 dropdown for this collection on a specified control element. */ - _initDropdownField: function(field) { + _initDropdownField: function (field) { var options = this.settings.dropdown; if (!("templateResult" in options)) { - options.templateResult = $.proxy(function(item) { + options.templateResult = $.proxy(function (item) { // Display loading text if the item is marked as "loading" if (item.loading) return item.text; @@ -317,7 +321,7 @@ }); // Handles instantiation and access to non-private methods. - $.fn[pluginName] = function(methodOrOptions) { + $.fn[pluginName] = function (methodOrOptions) { // Grab plugin instance var instance = $(this).data(pluginName); // If undefined or object, initalise plugin. @@ -332,14 +336,14 @@ else if (typeof methodOrOptions === 'string' && typeof instance[methodOrOptions] === 'function') { // Ensure not a private function if (methodOrOptions.indexOf('_') !== 0) { - return instance[methodOrOptions]( Array.prototype.slice.call(arguments, 1)); + return instance[methodOrOptions](Array.prototype.slice.call(arguments, 1)); } else { - console.warn( 'Method ' + methodOrOptions + ' is private!' ); + console.warn('Method ' + methodOrOptions + ' is private!'); } } else { - console.warn( 'Method ' + methodOrOptions + ' does not exist.' ); + console.warn('Method ' + methodOrOptions + ' does not exist.'); } }; })(jQuery, window, document); diff --git a/main/app/sprinkles/core/assets/userfrosting/js/uf-copy.js b/main/app/sprinkles/core/assets/userfrosting/js/uf-copy.js index a47f6b8..58930e5 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/uf-copy.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/uf-copy.js @@ -10,7 +10,7 @@ $.uf.copy = function (button) { var _this = this; var clipboard = new Clipboard(button, { - text: function(trigger) { + text: function (trigger) { var el = $(trigger).closest('.js-copy-container').find('.js-copy-target'); if (el.is(':input')) { return el.val(); @@ -20,26 +20,26 @@ $.uf.copy = function (button) { } }); - clipboard.on('success', function(e) { + clipboard.on('success', function (e) { setTooltip(e.trigger, 'Copied!'); hideTooltip(e.trigger); }); - clipboard.on('error', function(e) { + clipboard.on('error', function (e) { setTooltip(e.trigger, 'Failed!'); hideTooltip(e.trigger); }); function setTooltip(btn, message) { $(btn) - .attr('data-original-title', message) - .tooltip('show'); + .attr('data-original-title', message) + .tooltip('show'); } - + function hideTooltip(btn) { - setTimeout(function() { + setTimeout(function () { $(btn).tooltip('hide') - .attr('data-original-title', ""); + .attr('data-original-title', ""); }, 1000); } diff --git a/main/app/sprinkles/core/assets/userfrosting/js/uf-form.js b/main/app/sprinkles/core/assets/userfrosting/js/uf-form.js index 15952ab..3724ef7 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/uf-form.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/uf-form.js @@ -28,32 +28,32 @@ * * UserFrosting https://www.userfrosting.com * @author Alexander Weissman <https://alexanderweissman.com> - * + * * @todo Implement proper fallback for when `set` function isn't supported by FormData. */ -;(function($, window, document, undefined) { - 'use strict'; +;(function ($, window, document, undefined) { + 'use strict'; // Define plugin name and defaults. var pluginName = 'ufForm', defaults = { validators: { - 'rules' : {}, + 'rules': {}, 'messages': {} }, - submittingText : "<i class='fa fa-spinner fa-spin'></i>", + submittingText: "<i class='fa fa-spinner fa-spin'></i>", beforeSubmitCallback: null, - binaryCheckboxes : true, // submit checked/unchecked checkboxes as 0/1 values - keyupDelay : 0, + binaryCheckboxes: true, // submit checked/unchecked checkboxes as 0/1 values + keyupDelay: 0, DEBUG: false }; // Constructor - function Plugin (element, options) { + function Plugin(element, options) { this.element = element[0]; this.$element = $(this.element); var lateDefaults = { - encType : (typeof this.$element.attr('enctype') !== 'undefined') ? this.$element.attr('enctype') : '', + encType: (typeof this.$element.attr('enctype') !== 'undefined') ? this.$element.attr('enctype') : '', msgTarget: this.$element.find('.js-form-alerts:first') }; this.settings = $.extend(true, {}, defaults, lateDefaults, options); @@ -70,10 +70,10 @@ // Setup validator this.validator = this.$element.validate({ - rules : this.settings.validators.rules, - messages : this.settings.validators.messages, + rules: this.settings.validators.rules, + messages: this.settings.validators.messages, submitHandler: $.proxy(this._submitHandler, this), - onkeyup : $.proxy(this._onKeyUp, this) + onkeyup: $.proxy(this._onKeyUp, this) }); return this; @@ -84,7 +84,7 @@ /** * Handles the form submission after successful client-side validation. */ - Plugin.prototype._submitHandler = function(form, event) { + Plugin.prototype._submitHandler = function (form, event) { // Execute any "before submit" callback if (this.settings.beforeSubmitCallback) { this.settings.beforeSubmitCallback(); @@ -104,7 +104,7 @@ var reqParams = { converters: { // Override jQuery's strict JSON parsing - 'text json': function(result) { + 'text json': function (result) { try { // First try to use native browser parsing if (typeof JSON === 'object' && typeof JSON.parse === 'function') { @@ -113,9 +113,9 @@ return $.parseJSON(result); } } catch (e) { - // statements to handle any exceptions - console.warn('Could not parse expected JSON response.'); - return {}; + // statements to handle any exceptions + console.warn('Could not parse expected JSON response.'); + return {}; } } }, @@ -139,10 +139,10 @@ // Submit the form via AJAX $.ajax(reqParams).then( // Submission successful - $.proxy(function(data, textStatus, jqXHR) { + $.proxy(function (data, textStatus, jqXHR) { // Restore button text and re-enable submit button if (submitButton) { - submitButton.prop('disabled', false ); + submitButton.prop('disabled', false); submitButton.html(submitButtonText); } @@ -150,10 +150,10 @@ return jqXHR; }, this), // Submission failed - $.proxy(function(jqXHR, textStatus, errorThrown) { + $.proxy(function (jqXHR, textStatus, errorThrown) { // Restore button text and re-enable submit button if (submitButton) { - submitButton.prop('disabled', false ); + submitButton.prop('disabled', false); submitButton.html(submitButtonText); } // Error messages @@ -163,7 +163,7 @@ document.close(); } else { if (this.settings.DEBUG) { - console.log('Error (' + jqXHR.status + '): ' + jqXHR.responseText ); + console.log('Error (' + jqXHR.status + '): ' + jqXHR.responseText); } // Display errors on failure // TODO: ufAlerts widget should have a 'destroy' method @@ -186,13 +186,13 @@ /** * Helper function for encoding data as urlencoded */ - Plugin.prototype._urlencodeData = function(form) { + Plugin.prototype._urlencodeData = function (form) { // Serialize and post to the backend script in ajax mode var serializedData; if (this.settings.binaryCheckboxes) { serializedData = form.find(':input').not(':checkbox').serialize(); // Get unchecked checkbox values, set them to 0 - form.find('input[type=checkbox]:enabled').each(function() { + form.find('input[type=checkbox]:enabled').each(function () { if ($(this).is(':checked')) { serializedData += '&' + encodeURIComponent(this.name) + '=1'; } else { @@ -210,7 +210,7 @@ /** * Helper function for encoding data as multipart/form-data */ - Plugin.prototype._multipartData = function(form) { + Plugin.prototype._multipartData = function (form) { // Use FormData to wrap form contents. // https://developer.mozilla.org/en/docs/Web/API/FormData var formData = new FormData(form[0]); @@ -222,7 +222,7 @@ if (typeof formData.set !== 'function') { this.settings.msgTarget.ufAlerts('push', 'danger', "Your browser is missing a required feature. This form will still attempt to submit, but if it fails, you'll need to use Chrome for desktop or FireFox for desktop."); } else { - checkboxes.each(function() { + checkboxes.each(function () { if ($(this).is(':checked')) { // this replaces checkbox value with 1 (as we're using binaryCheckboxes). formData.set(this.name, 1); @@ -237,10 +237,10 @@ return formData; }; - Plugin.prototype._onKeyUp = function(element, event) { + Plugin.prototype._onKeyUp = function (element, event) { var validator = this.validator; // See http://stackoverflow.com/questions/41363409/jquery-validate-add-delay-to-keyup-validation - setTimeout(function() { + setTimeout(function () { // Avoid revalidate the field when pressing one of the following keys // Shift => 16 // Ctrl => 17 @@ -260,16 +260,16 @@ 38, 39, 40, 45, 144, 225 ]; - if ( event.which === 9 && validator.elementValue( element ) === '' || $.inArray( event.keyCode, excludedKeys ) !== -1 ) { + if (event.which === 9 && validator.elementValue(element) === '' || $.inArray(event.keyCode, excludedKeys) !== -1) { return; - } else if ( element.name in validator.submitted || element.name in validator.invalid ) { - validator.element( element ); + } else if (element.name in validator.submitted || element.name in validator.invalid) { + validator.element(element); } }, this.settings.keyupDelay); }; // Handles instantiation and access to non-private methods. - $.fn[pluginName] = function(methodOrOptions) { + $.fn[pluginName] = function (methodOrOptions) { // Grab plugin instance var instance = $(this).data(pluginName); // If undefined or object, initalise plugin. @@ -284,14 +284,14 @@ else if (typeof methodOrOptions === 'string' && typeof instance[methodOrOptions] === 'function') { // Ensure not a private function if (methodOrOptions.indexOf('_') !== 0) { - return instance[methodOrOptions]( Array.prototype.slice.call(arguments, 1)); + return instance[methodOrOptions](Array.prototype.slice.call(arguments, 1)); } else { - console.warn( 'Method ' + methodOrOptions + ' is private!' ); + console.warn('Method ' + methodOrOptions + ' is private!'); } } else { - console.warn( 'Method ' + methodOrOptions + ' does not exist.' ); + console.warn('Method ' + methodOrOptions + ' does not exist.'); } }; })(jQuery, window, document); diff --git a/main/app/sprinkles/core/assets/userfrosting/js/uf-init.js b/main/app/sprinkles/core/assets/userfrosting/js/uf-init.js index 2d447dd..3e5e574 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/uf-init.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/uf-init.js @@ -1,12 +1,13 @@ /** * Contains code that should be initialized in all UF pages. */ - -$(document).ready(function() { - + +$(document).ready(function () { + // Override Bootstrap's tendency to steal focus from child elements in modals (such as select2). // See https://github.com/select2/select2/issues/1436#issuecomment-21028474 - $.fn.modal.Constructor.prototype.enforceFocus = function() {}; + $.fn.modal.Constructor.prototype.enforceFocus = function () { + }; // Link all copy buttons $.uf.copy('.js-copy-trigger'); diff --git a/main/app/sprinkles/core/assets/userfrosting/js/uf-jqueryvalidation-config.js b/main/app/sprinkles/core/assets/userfrosting/js/uf-jqueryvalidation-config.js index 3969ad6..26b5f7a 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/uf-jqueryvalidation-config.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/uf-jqueryvalidation-config.js @@ -2,7 +2,7 @@ * Set jQuery.validate settings for bootstrap integration */ jQuery.validator.setDefaults({ - highlight: function(element) { + highlight: function (element) { var formGroup = jQuery(element).closest('.form-group'); formGroup.addClass('has-error has-feedback'); formGroup.removeClass('has-success'); @@ -12,7 +12,7 @@ jQuery.validator.setDefaults({ // Hide any help block text formGroup.find('.help-block').hide(); }, - unhighlight: function(element) { + unhighlight: function (element) { var formGroup = jQuery(element).closest('.form-group'); formGroup.removeClass('has-error'); @@ -30,14 +30,14 @@ jQuery.validator.setDefaults({ }, errorElement: 'p', errorClass: 'error-block', - errorPlacement: function(error, element) { - if(element.parent('.input-group').length) { + errorPlacement: function (error, element) { + if (element.parent('.input-group').length) { error.insertAfter(element.parent()); } else { error.insertAfter(element); } }, - success: function(element) { + success: function (element) { var formGroup = jQuery(element).closest('.form-group'); formGroup.addClass('has-success has-feedback'); formGroup.find('.form-control-feedback').remove(); diff --git a/main/app/sprinkles/core/assets/userfrosting/js/uf-modal.js b/main/app/sprinkles/core/assets/userfrosting/js/uf-modal.js index b84a59a..588c40b 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/uf-modal.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/uf-modal.js @@ -5,8 +5,7 @@ * UserFrosting https://www.userfrosting.com * @author Alexander Weissman https://alexanderweissman.com */ -(function( $ ) -{ +(function ($) { /** * The plugin namespace, ie for $('.selector').ufModal(options) * @@ -14,18 +13,17 @@ */ var PLUGIN_NS = 'ufModal'; - var Plugin = function ( target, options ) - { + var Plugin = function (target, options) { this.$T = $(target); /** #### OPTIONS #### */ - this.options= $.extend( + this.options = $.extend( true, // deep extend { - sourceUrl : "", + sourceUrl: "", ajaxParams: {}, - msgTarget : null, + msgTarget: null, DEBUG: false }, options @@ -33,14 +31,13 @@ this.modal = null; - this._init( target ); + this._init(target); return this; }; /** #### INITIALISER #### */ - Plugin.prototype._init = function ( target ) - { + Plugin.prototype._init = function (target) { var base = this; var $el = $(target); @@ -51,58 +48,58 @@ // Fetch and render the form $.ajax({ - type: "GET", - url: base.options.sourceUrl, - data: base.options.ajaxParams, - cache: false + type: "GET", + url: base.options.sourceUrl, + data: base.options.ajaxParams, + cache: false }) - .then( - // Fetch successful - function (data) { - // Append the form as a modal dialog to the body - base.modal = $(data); - $el.append(base.modal); - - base.modal.modal('show'); - - // Bind modal to be deleted when closed - base.modal.on("hidden.bs.modal", function () { - base.destroy(); - }); + .then( + // Fetch successful + function (data) { + // Append the form as a modal dialog to the body + base.modal = $(data); + $el.append(base.modal); + + base.modal.modal('show'); + + // Bind modal to be deleted when closed + base.modal.on("hidden.bs.modal", function () { + base.destroy(); + }); - base.$T.trigger('renderSuccess.ufModal'); - return data; - }, - // Fetch failed - function (data) { - // Error messages - if ((typeof site !== "undefined") && site.debug.ajax && data.responseText) { - base.$T.trigger('renderError.ufModal'); - document.write(data.responseText); - document.close(); - } else { - if (base.options.DEBUG) { - console.log("Error (" + data.status + "): " + data.responseText ); - } - // Display errors on failure - // TODO: ufAlerts widget should have a 'destroy' method - if (!base.options.msgTarget.data('ufAlerts')) { - base.options.msgTarget.ufAlerts(); + base.$T.trigger('renderSuccess.ufModal'); + return data; + }, + // Fetch failed + function (data) { + // Error messages + if ((typeof site !== "undefined") && site.debug.ajax && data.responseText) { + base.$T.trigger('renderError.ufModal'); + document.write(data.responseText); + document.close(); } else { - base.options.msgTarget.ufAlerts('clear'); + if (base.options.DEBUG) { + console.log("Error (" + data.status + "): " + data.responseText); + } + // Display errors on failure + // TODO: ufAlerts widget should have a 'destroy' method + if (!base.options.msgTarget.data('ufAlerts')) { + base.options.msgTarget.ufAlerts(); + } else { + base.options.msgTarget.ufAlerts('clear'); + } + + base.options.msgTarget.ufAlerts('fetch').ufAlerts('render'); + base.options.msgTarget.on("render.ufAlerts", function () { + base.$T.trigger('renderError.ufModal'); + }); } - base.options.msgTarget.ufAlerts('fetch').ufAlerts('render'); - base.options.msgTarget.on("render.ufAlerts", function () { - base.$T.trigger('renderError.ufModal'); - }); - } - - base.destroy(); + base.destroy(); - return data; - } - ); + return data; + } + ); }; Plugin.prototype.destroy = function () { @@ -127,26 +124,24 @@ Plugin.prototype.getModal = function () { return this.modal; }; - + /** * EZ Logging/Warning (technically private but saving an '_' is worth it imo) */ - Plugin.prototype.DLOG = function () - { + Plugin.prototype.DLOG = function () { if (!this.DEBUG) return; for (var i in arguments) { - console.log( PLUGIN_NS + ': ', arguments[i] ); + console.log(PLUGIN_NS + ': ', arguments[i]); } } - Plugin.prototype.DWARN = function () - { - this.DEBUG && console.warn( arguments ); + Plugin.prototype.DWARN = function () { + this.DEBUG && console.warn(arguments); } -/*################################################################################### - * JQUERY HOOK - ###################################################################################*/ + /*################################################################################### + * JQUERY HOOK + ###################################################################################*/ /** * Generic jQuery plugin instantiation method call logic @@ -155,38 +150,37 @@ * Notice, myActionMethod mustn't start with an underscore (_) as this is used to * indicate private methods on the PLUGIN class. */ - $.fn[ PLUGIN_NS ] = function( methodOrOptions ) - { + $.fn[PLUGIN_NS] = function (methodOrOptions) { if (!$(this).length) { return $(this); } var instance = $(this).data(PLUGIN_NS); // CASE: action method (public method on PLUGIN class) - if ( instance - && methodOrOptions.indexOf('_') != 0 - && instance[ methodOrOptions ] - && typeof( instance[ methodOrOptions ] ) == 'function' ) { + if (instance + && methodOrOptions.indexOf('_') != 0 + && instance[methodOrOptions] + && typeof(instance[methodOrOptions]) == 'function') { - return instance[ methodOrOptions ]( Array.prototype.slice.call( arguments, 1 ) ); + return instance[methodOrOptions](Array.prototype.slice.call(arguments, 1)); - // CASE: argument is options object or empty = initialise - } else if ( typeof methodOrOptions === 'object' || ! methodOrOptions ) { + // CASE: argument is options object or empty = initialise + } else if (typeof methodOrOptions === 'object' || !methodOrOptions) { - instance = new Plugin( $(this), methodOrOptions ); // ok to overwrite if this is a re-init - $(this).data( PLUGIN_NS, instance ); + instance = new Plugin($(this), methodOrOptions); // ok to overwrite if this is a re-init + $(this).data(PLUGIN_NS, instance); return $(this); - // CASE: method called before init - } else if ( !instance ) { - console.warn( 'Plugin must be initialised before using method: ' + methodOrOptions ); + // CASE: method called before init + } else if (!instance) { + console.warn('Plugin must be initialised before using method: ' + methodOrOptions); - // CASE: invalid method - } else if ( methodOrOptions.indexOf('_') == 0 ) { - console.warn( 'Method ' + methodOrOptions + ' is private!' ); + // CASE: invalid method + } else if (methodOrOptions.indexOf('_') == 0) { + console.warn('Method ' + methodOrOptions + ' is private!'); } else { - console.warn( 'Method ' + methodOrOptions + ' does not exist.' ); + console.warn('Method ' + methodOrOptions + ' does not exist.'); } }; })(jQuery);
\ No newline at end of file diff --git a/main/app/sprinkles/core/assets/userfrosting/js/uf-table.js b/main/app/sprinkles/core/assets/userfrosting/js/uf-table.js index 77aa30a..692dccc 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/uf-table.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/uf-table.js @@ -12,59 +12,59 @@ * - Your table should have a unique id, and your paging controls should be wrapped in an element with the `.js-uf-table-pager` class. * - Create a button with the `.js-uf-table-download` class, and it will be automatically bound to trigger an AJAX request for downloading the table (CSV, etc). * - <div id="widget-users"> - <table id="table-users" class="tablesorter table table-bordered table-hover table-striped" data-sortlist="[[0, 0]]"> - <thead> - <tr> - <th class="sorter-metatext" data-column-name="name" data-column-template="#user-table-column-info">User <i class="fa fa-sort"></i></th> - <th class="sorter-metanum" data-column-name="last_activity" data-column-template="#user-table-column-last-activity">Last Activity <i class="fa fa-sort"></i></th> - </tr> - </thead> - <tbody> - </tbody> - </table> - - <script id="user-table-column-info" type="text/x-handlebars-template"> - <td data-text="{{row.last_name}}"> - <strong> - <a href="{{site.uri.public}}/users/u/{{row.user_name}}">{{row.first_name}} {{row.last_name}} ({{row.user_name}})</a> - </strong> - <div> - <i class="fa fa-envelope"></i> <a href="mailto:{{row.email}}">{{row.email}}</a> - </div> - </td> - </script> - - <script id="user-table-column-last-activity" type="text/x-handlebars-template"> - {{#if row.last_activity_at }} - <td data-num="{{dateFormat row.last_activity_at format='x'}}"> - {{dateFormat row.last_activity_at format="dddd"}}<br>{{dateFormat row.last_activity_at format="MMM Do, YYYY h:mm a"}} - <br> - <i>{{row.last_activity.description}}</i> - </td> - {{ else }} - <td data-num="0"> - <i>Unknown</i> - </td> - {{/if }} - </script> - - <div class="pager pager-lg tablesorter-pager js-uf-table-pager"> - <span class="pager-control first" title="First page"><i class="fa fa-angle-double-left"></i></span> - <span class="pager-control prev" title="Previous page"><i class="fa fa-angle-left"></i></span> - <span class="pagedisplay"></span> - <span class="pager-control next" title="Next page"><i class="fa fa-angle-right"></i></span> - <span class="pager-control last" title= "Last page"><i class="fa fa-angle-double-right"></i></span> - <br><br> - Jump to Page: <select class="gotoPage"></select> • Show: - <select class="pagesize"> - <option value="5">5</option> - <option value="10">10</option> - </select> - </div> - - <button class="btn btn-sm btn-default js-uf-table-download">Download CSV</button> - </div> + <div id="widget-users"> + <table id="table-users" class="tablesorter table table-bordered table-hover table-striped" data-sortlist="[[0, 0]]"> + <thead> + <tr> + <th class="sorter-metatext" data-column-name="name" data-column-template="#user-table-column-info">User <i class="fa fa-sort"></i></th> + <th class="sorter-metanum" data-column-name="last_activity" data-column-template="#user-table-column-last-activity">Last Activity <i class="fa fa-sort"></i></th> + </tr> + </thead> + <tbody> + </tbody> + </table> + + <script id="user-table-column-info" type="text/x-handlebars-template"> + <td data-text="{{row.last_name}}"> + <strong> + <a href="{{site.uri.public}}/users/u/{{row.user_name}}">{{row.first_name}} {{row.last_name}} ({{row.user_name}})</a> + </strong> + <div> + <i class="fa fa-envelope"></i> <a href="mailto:{{row.email}}">{{row.email}}</a> + </div> + </td> + </script> + + <script id="user-table-column-last-activity" type="text/x-handlebars-template"> + {{#if row.last_activity_at }} + <td data-num="{{dateFormat row.last_activity_at format='x'}}"> + {{dateFormat row.last_activity_at format="dddd"}}<br>{{dateFormat row.last_activity_at format="MMM Do, YYYY h:mm a"}} + <br> + <i>{{row.last_activity.description}}</i> + </td> + {{ else }} + <td data-num="0"> + <i>Unknown</i> + </td> + {{/if }} + </script> + + <div class="pager pager-lg tablesorter-pager js-uf-table-pager"> + <span class="pager-control first" title="First page"><i class="fa fa-angle-double-left"></i></span> + <span class="pager-control prev" title="Previous page"><i class="fa fa-angle-left"></i></span> + <span class="pagedisplay"></span> + <span class="pager-control next" title="Next page"><i class="fa fa-angle-right"></i></span> + <span class="pager-control last" title= "Last page"><i class="fa fa-angle-double-right"></i></span> + <br><br> + Jump to Page: <select class="gotoPage"></select> • Show: + <select class="pagesize"> + <option value="5">5</option> + <option value="10">10</option> + </select> + </div> + + <button class="btn btn-sm btn-default js-uf-table-download">Download CSV</button> + </div> * * Initialize ufTable on your container object: * @@ -89,36 +89,38 @@ * UserFrosting https://www.userfrosting.com * @author Alexander Weissman <https://alexanderweissman.com> */ -;(function($, window, document, undefined) { +;(function ($, window, document, undefined) { 'use strict'; // Define plugin name and defaults. var pluginName = 'ufTable', defaults = { - DEBUG : false, - site : site, // global site variables - dataUrl : '', - msgTarget : $('#alerts-page'), - addParams : {}, - filterAllField : '_all', - useLoadingTransition : true, - rowTemplate : null, - columnTemplates : {}, - tablesorter : { + DEBUG: false, + site: site, // global site variables + dataUrl: '', + msgTarget: $('#alerts-page'), + addParams: {}, + filterAllField: '_all', + useLoadingTransition: true, + rowTemplate: null, + columnTemplates: {}, + tablesorter: { debug: false, - theme : 'bootstrap', + theme: 'bootstrap', widthFixed: true, // Set up pagination of data via an AJAX source // See http://jsfiddle.net/Mottie/uwZc2/ // Also see https://mottie.github.io/tablesorter/docs/example-pager-ajax.html widgets: ['saveSort', 'sort2Hash', 'filter', 'pager', 'columnSelector', 'reflow2'], - widgetOptions : { - columnSelector_layout : '<label><input type="checkbox"> <span>{name}</span></label>', + widgetOptions: { + columnSelector_layout: '<label><input type="checkbox"> <span>{name}</span></label>', filter_cssFilter: 'form-control', - filter_saveFilters : true, - filter_serversideFiltering : true, - filter_selectSource : { - '.filter-select' : function() { return null; } + filter_saveFilters: true, + filter_serversideFiltering: true, + filter_selectSource: { + '.filter-select': function () { + return null; + } }, // apply disabled classname to the pager arrows when the rows at either extreme is visible @@ -143,8 +145,8 @@ // target the pager markup - see the HTML block below pager_css: { - errorRow : 'uf-table-error-row', // error information row - disabled : 'disabled' // Note there is no period "." in front of this class name + errorRow: 'uf-table-error-row', // error information row + disabled: 'disabled' // Note there is no period "." in front of this class name }, // Must be initialized with a 'data' key @@ -154,23 +156,23 @@ }, // hash prefix - sort2Hash_hash : '#', + sort2Hash_hash: '#', // don't '#' or '=' here - sort2Hash_separator : '|', + sort2Hash_separator: '|', // this option > table ID > table index on page - sort2Hash_tableId : null, + sort2Hash_tableId: null, // if true, show header cell text instead of a zero-based column index - sort2Hash_headerTextAttr : 'data-column-name', + sort2Hash_headerTextAttr: 'data-column-name', // direction text shown in the URL e.g. [ 'asc', 'desc' ] - sort2Hash_directionText : [ 'asc', 'desc' ], // default values + sort2Hash_directionText: ['asc', 'desc'], // default values // if true, override saveSort widget sort, if used & stored sort is available - sort2Hash_overrideSaveSort : true, // default = false + sort2Hash_overrideSaveSort: true, // default = false } } }; // Constructor - function Plugin (element, options) { + function Plugin(element, options) { this.element = element[0]; this.$element = $(this.element); @@ -189,19 +191,19 @@ tableElement: this.$element.find('.tablesorter'), tablesorter: { widgetOptions: { - columnSelector_container : this.$element.find('.js-uf-table-cs-options'), - filter_external : this.$element.find('.js-uf-table-search input'), + columnSelector_container: this.$element.find('.js-uf-table-cs-options'), + filter_external: this.$element.find('.js-uf-table-search input'), // Pager selectors pager_selectors: { - container : this.$element.find('.js-uf-table-pager'), - first : '.first', // go to first page arrow - prev : '.prev', // previous page arrow - next : '.next', // next page arrow - last : '.last', // go to last page arrow - gotoPage : '.gotoPage', // go to page selector - select dropdown that sets the current page - pageDisplay : '.pagedisplay', // location of where the "output" is displayed - pageSize : '.pagesize' // page size selector - select dropdown that sets the "size" option + container: this.$element.find('.js-uf-table-pager'), + first: '.first', // go to first page arrow + prev: '.prev', // previous page arrow + next: '.next', // next page arrow + last: '.last', // go to last page arrow + gotoPage: '.gotoPage', // go to page selector - select dropdown that sets the current page + pageDisplay: '.pagedisplay', // location of where the "output" is displayed + pageSize: '.pagesize' // page size selector - select dropdown that sets the "size" option }, // We need to use $.proxy to properly bind the context for callbacks that will be called by Tablesorter @@ -233,16 +235,16 @@ var dataAttributeDefaults = { info: { messageEmptyRows: infoContainer.data('message-empty-rows') ? - infoContainer.data('message-empty-rows') : - "Sorry, we've got nothing here." + infoContainer.data('message-empty-rows') : + "Sorry, we've got nothing here." }, tablesorter: { widgetOptions: { // possible variables: {size}, {page}, {totalPages}, {filteredPages}, {startRow}, {endRow}, {filteredRows} and {totalRows} // also {page:input} & {startRow:input} will add a modifiable input in place of the value pager_output: pagerContainer.data('output-template') ? - pagerContainer.data('output-template') : - '{startRow} to {endRow} of {filteredRows} ({totalRows})' // default if not set on data-* attribute + pagerContainer.data('output-template') : + '{startRow} to {endRow} of {filteredRows} ({totalRows})' // default if not set on data-* attribute } } }; @@ -264,9 +266,9 @@ // Set up 'loading' overlays if (this.settings.useLoadingTransition) { var overlay = this.settings.overlay.container; - tableElement.bind('sortStart filterStart pageMoved', function() { + tableElement.bind('sortStart filterStart pageMoved', function () { overlay.removeClass('hidden'); - }).bind('pagerComplete updateComplete', function() { + }).bind('pagerComplete updateComplete', function () { overlay.addClass('hidden'); }); } @@ -320,7 +322,7 @@ this.settings.download.button.on('click', this.settings.download.callback); // Allow clicking on the labels in the table menu without closing the menu - $(this.settings.tablesorter.widgetOptions.columnSelector_container).find('label').on('click', function(e) { + $(this.settings.tablesorter.widgetOptions.columnSelector_container).find('label').on('click', function (e) { e.stopPropagation(); }); @@ -345,7 +347,7 @@ /** * Get state variables for this table, as required by the AJAX data source: sorts, filters, size, page */ - Plugin.prototype.getTableStateVars = function(table) { + Plugin.prototype.getTableStateVars = function (table) { var base = this; // Get sort column and order @@ -394,7 +396,7 @@ /** * Get saved filters from the browser local storage. Those should always be up to date */ - Plugin.prototype.getSavedFilters = function(table) { + Plugin.prototype.getSavedFilters = function (table) { // Fallback to `getFilters` or empty in case of failure var filterList = $.tablesorter.getFilters(table) || []; @@ -402,12 +404,12 @@ // Overwrite list with saved filter for filter-select not setup by ts var isArray, saved, wo = table.config.widgetOptions; - if ( wo.filter_saveFilters && $.tablesorter.storage ) { - saved = $.tablesorter.storage( table, 'tablesorter-filters' ) || []; - isArray = $.isArray( saved ); + if (wo.filter_saveFilters && $.tablesorter.storage) { + saved = $.tablesorter.storage(table, 'tablesorter-filters') || []; + isArray = $.isArray(saved); // make sure we're not just getting an empty array - if ( !( isArray && saved.join( '' ) === '' || !isArray ) ) { - filterList = $.tablesorter.filter.processFilters( saved ); + if (!(isArray && saved.join('') === '' || !isArray)) { + filterList = $.tablesorter.filter.processFilters(saved); } } @@ -419,7 +421,7 @@ * Used as the default callback for pager_customAjaxUrl * @private */ - Plugin.prototype._generateUrl = function(table, url) { + Plugin.prototype._generateUrl = function (table, url) { var tableState = this.getTableStateVars(table); if (this.settings.DEBUG) { @@ -438,7 +440,7 @@ * Used as the default callback for pager_ajaxProcessing * @private */ - Plugin.prototype._processAjax = function(data) { + Plugin.prototype._processAjax = function (data) { var ts = this.ts[0]; var json = {}, rows = ''; @@ -450,8 +452,8 @@ for (var row = 0; row < size; row++) { var cellData = { rownum: row, - row : data.rows[row], // It is safe to use the data from the API because Handlebars escapes HTML - site : this.settings.site + row: data.rows[row], // It is safe to use the data from the API because Handlebars escapes HTML + site: this.settings.site }; rows += this.rowTemplate(cellData); @@ -484,7 +486,7 @@ * Initialize filter select menus using the ajax `listable` values * @private */ - Plugin.prototype._ajaxInitFilterSelects = function(columns, listable) { + Plugin.prototype._ajaxInitFilterSelects = function (columns, listable) { var ts = this.ts[0]; var filters = this.getSavedFilters(ts); // Find columns with `.filter-select` and match them to column numbers based on their data-column-name @@ -527,7 +529,7 @@ * Handle pager ajax errors. * @private */ - Plugin.prototype._pagerAjaxError = function(c, jqXHR, settings, exception) { + Plugin.prototype._pagerAjaxError = function (c, jqXHR, settings, exception) { this._ajaxError(jqXHR); // Let TS handle the in-table error message @@ -538,7 +540,7 @@ * Handle ajax error * @private */ - Plugin.prototype._ajaxError = function(jqXHR) { + Plugin.prototype._ajaxError = function (jqXHR) { if (typeof jqXHR === 'object') { // Error messages if (this._debugAjax && jqXHR.responseText) { @@ -546,7 +548,7 @@ document.close(); } else { if (this.settings.DEBUG) { - console.log('Error (' + jqXHR.status + '): ' + jqXHR.responseText ); + console.log('Error (' + jqXHR.status + '): ' + jqXHR.responseText); } // Display errors on failure // TODO: ufAlerts widget should have a 'destroy' method @@ -583,9 +585,9 @@ * Default callback for sort2Hash_encodeHash * @private */ - Plugin.prototype._encodeHash = function(config, tableId, component, value, rawValue) { + Plugin.prototype._encodeHash = function (config, tableId, component, value, rawValue) { var wo = config.widgetOptions; - if ( component === 'filter' ) { + if (component === 'filter') { // rawValue is an array of filter values, numerically indexed var encodedFilters = ''; var len = rawValue.length; @@ -599,7 +601,7 @@ } } return encodedFilters; - } else if ( component === 'sort' ) { + } else if (component === 'sort') { // rawValue is an array of sort pairs [columnNum, sortDirection] var encodedFilters = ''; var len = rawValue.length; @@ -619,7 +621,7 @@ * Default callback for sort2Hash_decodeHash * @private */ - Plugin.prototype._decodeHash = function(config, tableId, component) { + Plugin.prototype._decodeHash = function (config, tableId, component) { var wo = config.widgetOptions; var result; // Convert hash into JSON object @@ -657,7 +659,7 @@ * Default callback for sort2Hash_cleanHash * @private */ - Plugin.prototype._cleanHash = function(config, tableId, component, hash) { + Plugin.prototype._cleanHash = function (config, tableId, component, hash) { var wo = config.widgetOptions; // Convert hash to JSON object var urlObject = $.String.deparam(hash); @@ -678,7 +680,7 @@ }; // Handles instantiation and access to non-private methods. - $.fn[pluginName] = function(methodOrOptions) { + $.fn[pluginName] = function (methodOrOptions) { // Grab plugin instance var instance = $(this).data(pluginName); // If undefined or object, initalise plugin. @@ -688,17 +690,17 @@ $(this).data(pluginName, new Plugin(this, methodOrOptions)); } return this; - // Otherwise ensure first parameter is a valid string, and is the name of an actual function. + // Otherwise ensure first parameter is a valid string, and is the name of an actual function. } else if (typeof methodOrOptions === 'string' && typeof instance[methodOrOptions] === 'function') { // Ensure not a private function if (methodOrOptions.indexOf('_') !== 0) { - return instance[methodOrOptions]( Array.prototype.slice.call(arguments, 1)); + return instance[methodOrOptions](Array.prototype.slice.call(arguments, 1)); } else { - console.warn( 'Method ' + methodOrOptions + ' is private!' ); + console.warn('Method ' + methodOrOptions + ' is private!'); } } else { - console.warn( 'Method ' + methodOrOptions + ' does not exist.' ); + console.warn('Method ' + methodOrOptions + ' does not exist.'); } }; })(jQuery, window, document); diff --git a/main/app/sprinkles/core/assets/userfrosting/js/uf-tablesorter-parsers.js b/main/app/sprinkles/core/assets/userfrosting/js/uf-tablesorter-parsers.js index 0d83c10..02901c5 100644 --- a/main/app/sprinkles/core/assets/userfrosting/js/uf-tablesorter-parsers.js +++ b/main/app/sprinkles/core/assets/userfrosting/js/uf-tablesorter-parsers.js @@ -3,14 +3,14 @@ $.tablesorter.addParser({ // set a unique id id: 'metanum', - is: function(s) { - // return false so this parser is not auto detected - return false; + is: function (s) { + // return false so this parser is not auto detected + return false; }, - format: function(s, table, cell, cellIndex) { - var $cell = $(cell); - // returns metadata, or cell text (s) if it doesn't exist - return $cell.attr('data-num') || s; + format: function (s, table, cell, cellIndex) { + var $cell = $(cell); + // returns metadata, or cell text (s) if it doesn't exist + return $cell.attr('data-num') || s; }, // set type to numeric @@ -20,14 +20,14 @@ $.tablesorter.addParser({ $.tablesorter.addParser({ // set a unique id id: 'metatext', - is: function(s) { - // return false so this parser is not auto detected - return false; + is: function (s) { + // return false so this parser is not auto detected + return false; }, - format: function(s, table, cell, cellIndex) { - var $cell = $(cell); - // returns metadata, or cell text (s) if it doesn't exist - return $cell.attr('data-text') || s; + format: function (s, table, cell, cellIndex) { + var $cell = $(cell); + // returns metadata, or cell text (s) if it doesn't exist + return $cell.attr('data-text') || s; }, @@ -37,15 +37,15 @@ $.tablesorter.addParser({ $.tablesorter.addParser({ // set a unique id id: 'isblank', - is: function(s) { - // return false so this parser is not auto detected - return false; + is: function (s) { + // return false so this parser is not auto detected + return false; }, - format: function(s, table, cell, cellIndex) { - var $cell = $(cell); - // returns 1 if blank (whitespace), 0 otherwise - var isBlank = $cell.html().trim() == " " ? 1 : 0; - return isBlank; + format: function (s, table, cell, cellIndex) { + var $cell = $(cell); + // returns 1 if blank (whitespace), 0 otherwise + var isBlank = $cell.html().trim() == " " ? 1 : 0; + return isBlank; }, |