测试化
1 | /* Write your custom CSS here */ | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | .page-content { | ||
2 | background: #343f47; | ||
3 | } | ||
4 | |||
5 | .navbar .logo-box { | ||
6 | background: #12afcb; | ||
7 | } | ||
8 | |||
9 | .navbar .logo-box a { | ||
10 | color: #fff; | ||
11 | } | ||
12 | |||
13 | .sidebar { | ||
14 | background: #343f47; | ||
15 | } | ||
16 | |||
17 | .sidebar-header { | ||
18 | background: #343f47; | ||
19 | } | ||
20 | |||
21 | .sidebar-profile span small { | ||
22 | color: #cedadd; | ||
23 | } | ||
24 | |||
25 | .menu { | ||
26 | background: #343f47; | ||
27 | } | ||
28 | |||
29 | .menu.accordion-menu a { | ||
30 | color: #cedadd; | ||
31 | } | ||
32 | |||
33 | .menu.accordion-menu > li > a:hover { | ||
34 | background: #2c363e; | ||
35 | color: #fff; | ||
36 | } | ||
37 | |||
38 | .menu.accordion-menu > li.active > a, | ||
39 | .menu.accordion-menu > li.active.open > a { | ||
40 | background: #2c363e; | ||
41 | color: #fff; | ||
42 | } | ||
43 | |||
44 | .small-sidebar:not(.page-sidebar-fixed) .accordion-menu li.droplink:hover > a, | ||
45 | .horizontal-bar .accordion-menu > li.droplink:hover > a, | ||
46 | .menu.accordion-menu ul, | ||
47 | .menu.accordion-menu li.open > a, | ||
48 | .hover-menu .accordion-menu > li.droplink:hover > a { | ||
49 | background: #2c363e; | ||
50 | color: #fff; | ||
51 | } | ||
52 | |||
53 | .menu.accordion-menu ul li a:hover, | ||
54 | .menu.accordion-menu ul li.active a { | ||
55 | background: #343f47; | ||
56 | color: #fff; | ||
57 | } | ||
58 | |||
59 | .menu.accordion-menu ul li a { | ||
60 | color: #cedadd; | ||
61 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | .page-content { | ||
2 | background: #34425A; | ||
3 | } | ||
4 | |||
5 | .navbar .logo-box { | ||
6 | background: #34425A; | ||
7 | } | ||
8 | |||
9 | .navbar .logo-box a { | ||
10 | color: #fff; | ||
11 | } | ||
12 | |||
13 | .sidebar { | ||
14 | background: #34425A; | ||
15 | } | ||
16 | |||
17 | .sidebar-header { | ||
18 | background: #34425A; | ||
19 | } | ||
20 | |||
21 | .sidebar-profile span small { | ||
22 | color: #899dc1; | ||
23 | } | ||
24 | |||
25 | .menu { | ||
26 | background: #34425A; | ||
27 | } | ||
28 | |||
29 | .menu.accordion-menu a { | ||
30 | color: #899dc1; | ||
31 | } | ||
32 | |||
33 | .menu.accordion-menu > li > a:hover { | ||
34 | background: #2b384e; | ||
35 | color: #fff; | ||
36 | } | ||
37 | |||
38 | .menu.accordion-menu > li.active > a, | ||
39 | .menu.accordion-menu > li.active.open > a { | ||
40 | background: #2b384e; | ||
41 | color: #fff; | ||
42 | } | ||
43 | |||
44 | .small-sidebar:not(.page-sidebar-fixed) .accordion-menu li.droplink:hover > a, | ||
45 | .horizontal-bar .accordion-menu > li.droplink:hover > a, | ||
46 | .menu.accordion-menu ul, | ||
47 | .menu.accordion-menu li.open > a, | ||
48 | .hover-menu .accordion-menu > li.droplink:hover > a { | ||
49 | background: #2B384E; | ||
50 | color: #fff; | ||
51 | } | ||
52 | |||
53 | .menu.accordion-menu ul li a:hover, | ||
54 | .menu.accordion-menu ul li.active a { | ||
55 | background: #34425A; | ||
56 | color: #fff; | ||
57 | } | ||
58 | |||
59 | .menu.accordion-menu ul li a { | ||
60 | color: #899dc1; | ||
61 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | .page-content { | ||
2 | background: #34425A; | ||
3 | } | ||
4 | |||
5 | .navbar .logo-box { | ||
6 | background: #22baa0; | ||
7 | } | ||
8 | |||
9 | .navbar .logo-box a { | ||
10 | color: #fff; | ||
11 | } | ||
12 | |||
13 | .sidebar { | ||
14 | background: #34425A; | ||
15 | } | ||
16 | |||
17 | .sidebar-header { | ||
18 | background: #34425A; | ||
19 | } | ||
20 | |||
21 | .sidebar-profile span small { | ||
22 | color: #899dc1; | ||
23 | } | ||
24 | |||
25 | .menu { | ||
26 | background: #34425A; | ||
27 | } | ||
28 | |||
29 | .menu.accordion-menu a { | ||
30 | color: #899dc1; | ||
31 | } | ||
32 | |||
33 | .menu.accordion-menu > li > a:hover { | ||
34 | background: #2b384e; | ||
35 | color: #fff; | ||
36 | } | ||
37 | |||
38 | .menu.accordion-menu > li.active > a, | ||
39 | .menu.accordion-menu > li.active.open > a { | ||
40 | background: #2b384e; | ||
41 | color: #fff; | ||
42 | } | ||
43 | |||
44 | .small-sidebar:not(.page-sidebar-fixed) .accordion-menu li.droplink:hover > a, | ||
45 | .horizontal-bar .accordion-menu > li.droplink:hover > a, | ||
46 | .menu.accordion-menu ul, | ||
47 | .menu.accordion-menu li.open > a, | ||
48 | .hover-menu .accordion-menu > li.droplink:hover > a { | ||
49 | background: #2B384E; | ||
50 | color: #fff; | ||
51 | } | ||
52 | |||
53 | .menu.accordion-menu ul li a:hover, | ||
54 | .menu.accordion-menu ul li.active a { | ||
55 | background: #34425A; | ||
56 | color: #fff; | ||
57 | } | ||
58 | |||
59 | .menu.accordion-menu ul li a { | ||
60 | color: #899dc1; | ||
61 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | .page-content { | ||
2 | background: #3f4454; | ||
3 | } | ||
4 | |||
5 | .navbar .logo-box { | ||
6 | background: #7a6fbe; | ||
7 | } | ||
8 | |||
9 | .navbar .logo-box a { | ||
10 | color: #fff; | ||
11 | } | ||
12 | |||
13 | .sidebar { | ||
14 | background: #3f4454; | ||
15 | } | ||
16 | |||
17 | .sidebar-header { | ||
18 | background: #3f4454; | ||
19 | } | ||
20 | |||
21 | .sidebar-profile span small { | ||
22 | color: #ccc; | ||
23 | } | ||
24 | |||
25 | .menu { | ||
26 | background: #3f4454; | ||
27 | } | ||
28 | |||
29 | .menu.accordion-menu a { | ||
30 | color: #ccc; | ||
31 | } | ||
32 | |||
33 | .menu.accordion-menu > li > a:hover { | ||
34 | background: #363b4a; | ||
35 | color: #fff; | ||
36 | } | ||
37 | |||
38 | .menu.accordion-menu > li.active > a, | ||
39 | .menu.accordion-menu > li.active.open > a { | ||
40 | background: #363b4a; | ||
41 | color: #fff; | ||
42 | } | ||
43 | |||
44 | .small-sidebar:not(.page-sidebar-fixed) .accordion-menu li.droplink:hover > a, | ||
45 | .horizontal-bar .accordion-menu > li.droplink:hover > a, | ||
46 | .menu.accordion-menu ul, | ||
47 | .menu.accordion-menu li.open > a, | ||
48 | .hover-menu .accordion-menu > li.droplink:hover > a { | ||
49 | background: #363b4a; | ||
50 | color: #fff; | ||
51 | } | ||
52 | |||
53 | .menu.accordion-menu ul li a:hover, | ||
54 | .menu.accordion-menu ul li.active a { | ||
55 | background: #3f4454; | ||
56 | color: #fff; | ||
57 | } | ||
58 | |||
59 | .menu.accordion-menu ul li a { | ||
60 | color: #ccc; | ||
61 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | .page-content { | ||
2 | background: #3f4454; | ||
3 | } | ||
4 | |||
5 | .navbar .logo-box { | ||
6 | background: #F25656; | ||
7 | } | ||
8 | |||
9 | .navbar .logo-box a { | ||
10 | color: #fff; | ||
11 | } | ||
12 | |||
13 | .sidebar { | ||
14 | background: #3f4454; | ||
15 | } | ||
16 | |||
17 | .sidebar-header { | ||
18 | background: #3f4454; | ||
19 | } | ||
20 | |||
21 | .sidebar-profile span small { | ||
22 | color: #ccc; | ||
23 | } | ||
24 | |||
25 | .menu { | ||
26 | background: #3f4454; | ||
27 | } | ||
28 | |||
29 | .menu.accordion-menu a { | ||
30 | color: #ccc; | ||
31 | } | ||
32 | |||
33 | .menu.accordion-menu > li > a:hover { | ||
34 | background: #363b4a; | ||
35 | color: #fff; | ||
36 | } | ||
37 | |||
38 | .menu.accordion-menu > li.active > a, | ||
39 | .menu.accordion-menu > li.active.open > a { | ||
40 | background: #363b4a; | ||
41 | color: #fff; | ||
42 | } | ||
43 | |||
44 | .small-sidebar:not(.page-sidebar-fixed) .accordion-menu li.droplink:hover > a, | ||
45 | .horizontal-bar .accordion-menu > li.droplink:hover > a, | ||
46 | .menu.accordion-menu ul, | ||
47 | .menu.accordion-menu li.open > a, | ||
48 | .hover-menu .accordion-menu > li.droplink:hover > a { | ||
49 | background: #363b4a; | ||
50 | color: #fff; | ||
51 | } | ||
52 | |||
53 | .menu.accordion-menu ul li a:hover, | ||
54 | .menu.accordion-menu ul li.active a { | ||
55 | background: #3f4454; | ||
56 | color: #fff; | ||
57 | } | ||
58 | |||
59 | .menu.accordion-menu ul li a { | ||
60 | color: #ccc; | ||
61 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | .page-content { | ||
2 | background: #34425A; | ||
3 | } | ||
4 | |||
5 | .navbar .logo-box { | ||
6 | background: #fff; | ||
7 | } | ||
8 | |||
9 | .navbar .logo-box a { | ||
10 | color: #5f5f5f; | ||
11 | } | ||
12 | |||
13 | .sidebar { | ||
14 | background: #34425A; | ||
15 | } | ||
16 | |||
17 | .sidebar-header { | ||
18 | background: #34425A; | ||
19 | } | ||
20 | |||
21 | .sidebar-profile span small { | ||
22 | color: #899dc1; | ||
23 | } | ||
24 | |||
25 | .menu { | ||
26 | background: #34425A; | ||
27 | } | ||
28 | |||
29 | .menu.accordion-menu a { | ||
30 | color: #899dc1; | ||
31 | } | ||
32 | |||
33 | .menu.accordion-menu > li > a:hover { | ||
34 | background: #2b384e; | ||
35 | color: #fff; | ||
36 | } | ||
37 | |||
38 | .menu.accordion-menu > li.active > a, | ||
39 | .menu.accordion-menu > li.active.open > a { | ||
40 | background: #2b384e; | ||
41 | color: #fff; | ||
42 | } | ||
43 | |||
44 | .small-sidebar:not(.page-sidebar-fixed) .accordion-menu li.droplink:hover > a, | ||
45 | .horizontal-bar .accordion-menu > li.droplink:hover > a, | ||
46 | .menu.accordion-menu ul, | ||
47 | .menu.accordion-menu li.open > a, | ||
48 | .hover-menu .accordion-menu > li.droplink:hover > a { | ||
49 | background: #2B384E; | ||
50 | color: #fff; | ||
51 | } | ||
52 | |||
53 | .menu.accordion-menu ul li a:hover, | ||
54 | .menu.accordion-menu ul li.active a { | ||
55 | background: #34425A; | ||
56 | color: #fff; | ||
57 | } | ||
58 | |||
59 | .menu.accordion-menu ul li a { | ||
60 | color: #899dc1; | ||
61 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
444 KB
548 KB
28.1 KB
104 KB
166 KB
103 KB
86.7 KB
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | ||
3 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | ||
4 | <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | ||
5 | width="44px" height="44px" viewBox="-1 3 44 44" enable-background="new -1 3 44 44" xml:space="preserve"> | ||
6 | <g> | ||
7 | |||
8 | <line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="square" stroke-miterlimit="10" x1="11" y1="15" x2="31" y2="35"/> | ||
9 | |||
10 | <line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="square" stroke-miterlimit="10" x1="31" y1="15" x2="11" y2="35"/> | ||
11 | </g> | ||
12 | </svg> |
628 KB
5.26 MB
10.6 KB
124 KB
109 KB
183 KB
116 KB
117 KB
108 KB
219 KB
150 KB
149 KB
136 KB
149 KB
142 KB
194 KB
135 KB
182 KB
177 KB
167 KB
138 KB
177 KB
198 KB
188 KB
176 KB
124 KB
154 KB
4.66 KB
868 KB
1.67 MB
17.1 KB
62.1 KB
39.8 KB
52.6 KB
60.8 KB
67.1 KB
55 KB
32.5 KB
39.6 KB
42.2 KB
46.1 KB
4.02 KB
206 KB
211 KB
337 KB
215 KB
29.8 KB
21.6 KB
53.4 KB
30.9 KB
1 | $(document).ready(function(){function e(){document.fullScreenElement&&null!==document.fullScreenElement||!document.mozFullScreen&&!document.webkitIsFullScreen?document.documentElement.requestFullScreen?document.documentElement.requestFullScreen():document.documentElement.mozRequestFullScreen?document.documentElement.mozRequestFullScreen():document.documentElement.webkitRequestFullScreen&&document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):document.cancelFullScreen?document.cancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}function a(e){$(e).block({message:'<img src="assets/images/reload.gif" width="20px" alt="">',css:{border:"none",padding:"0px",width:"20px",height:"20px",backgroundColor:"transparent"},overlayCSS:{backgroundColor:"#fff",opacity:.9,cursor:"wait"}})}function o(e){$(e).unblock()}$(".show-search").click(function(){$(".search-form").css("margin-top","0"),$(".search-input").focus()}),$(".close-search").click(function(){$(".search-form").css("margin-top","-60px")}),$(".toggle-fullscreen").click(function(){e()}),Waves.displayEffect(),$('[data-toggle~="tooltip"]').tooltip({container:"body"});var n=Array.prototype.slice.call(document.querySelectorAll(".js-switch"));n.forEach(function(e){new Switchery(e,{color:"#23B7E5"})}),$(".panel-collapse").click(function(){$(this).closest(".panel").children(".panel-body").slideToggle("fast")}),$(".panel-reload").click(function(){var e=$(this).closest(".panel").children(".panel-body");a(e),window.setTimeout(function(){o(e)},1e3)}),$(".panel-remove").click(function(){$(this).closest(".panel").hide()}),$(".push-sidebar").click(function(){var e=$(".sidebar");e.hasClass("visible")?(e.removeClass("visible"),$(".page-inner").removeClass("sidebar-visible")):(e.addClass("visible"),$(".page-inner").addClass("sidebar-visible"))}),$(".sortable").sortable({connectWith:".sortable",items:".panel",helper:"original",revert:!0,placeholder:"panel-placeholder",forcePlaceholderSize:!0,opacity:.95,cursor:"move"});var s=$("input[type=checkbox]:not(.switchery), input[type=radio]:not(.no-uniform)");s.size()>0&&s.each(function(){$(this).uniform()}),$.fn.toggleAttr=function(e,a){var o=void 0===a;return this.each(function(){o&&!$(this).is("["+e+"]")||!o&&a?$(this).attr(e,e):$(this).removeAttr(e)})};$(".sidebar .accordion-menu li .sub-menu").slideUp(0),$(".sidebar .accordion-menu li.open .sub-menu").slideDown(0),$(".small-sidebar .sidebar .accordion-menu li.open .sub-menu").hide(0),$(".sidebar .accordion-menu > li.droplink > a").click(function(){if(!$("body").hasClass(".small-sidebar")&&!$("body").hasClass(".page-horizontal-bar")&&!$("body").hasClass(".hover-menu")){{var e=$(".sidebar .menu"),a=($(".page-sidebar-inner"),$(".page-content"),$(this).next());$(this)}return e.find("li").removeClass("open"),$(".sub-menu").slideUp(200,function(){c()}),c(),a.is(":visible")?a.slideUp(200,function(){c()}):($(this).parent("li").addClass("open"),$(this).next(".sub-menu").slideDown(200,function(){c()})),!1}}),$(".sidebar .accordion-menu .sub-menu li.droplink > a").click(function(){{var e=$(this).parent().parent(),a=($(".page-sidebar-inner"),$(".page-content"),$(this).next());$(this)}return e.find("li").removeClass("open"),c(),a.is(":visible")?a.slideUp(200,function(){c()}):($(this).parent("li").addClass("open"),$(this).next(".sub-menu").slideDown(200,function(){c()})),!1});var c=function(){{var e,a=$(".page-inner"),o=$(".page-sidebar"),n=$("body"),s=$(".page-footer").outerHeight();$(".page-content").height()}a.attr("style","min-height:"+o.height()+"px !important"),n.hasClass("page-sidebar-fixed")?e=o.height()+s:(e=o.height()+s,e<$(window).height()&&(e=$(window).height())),e>=a.height()&&a.attr("style","min-height:"+e+"px !important")};c(),window.onresize=c,$(".slimscroll").slimscroll({allowPageScroll:!0});var t=document.querySelector(".fixed-header-check"),i=document.querySelector(".fixed-sidebar-check"),l=document.querySelector(".horizontal-bar-check"),d=document.querySelector(".toggle-sidebar-check"),r=document.querySelector(".boxed-layout-check"),h=document.querySelector(".compact-menu-check"),u=document.querySelector(".hover-menu-check"),b=function(){$("body").hasClass("small-sidebar")&&1==d.checked&&d.click(),$("body").hasClass("page-header-fixed")||0!=t.checked||t.click(),$("body").hasClass("page-sidebar-fixed")&&1==i.checked&&i.click(),$("body").hasClass("page-horizontal-bar")&&1==l.checked&&l.click(),$("body").hasClass("compact-menu")&&1==h.checked&&h.click(),$("body").hasClass("hover-menu")&&1==u.checked&&u.click(),$(".page-content").hasClass("container")&&1==r.checked&&r.click(),$(".theme-color").attr("href","assets/css/themes/white.css"),c()},m=$(".navbar .logo-box a span").text(),p=m.slice(0,1),g=function(){$("body").toggleClass("small-sidebar"),$(".navbar .logo-box a span").html($(".navbar .logo-box a span").text()==p?m:p),c()},f=function(){$("body").hasClass("page-horizontal-bar")&&$("body").hasClass("page-sidebar-fixed")&&$("body").hasClass("page-header-fixed")&&(i.click(),alert("Static header isn't compatible with fixed horizontal nav mode. Modern will set static mode on horizontal nav.")),$("body").toggleClass("page-header-fixed"),c()},k=function(){!$("body").hasClass("page-horizontal-bar")||$("body").hasClass("page-sidebar-fixed")||$("body").hasClass("page-header-fixed")||(t.click(),alert("Fixed horizontal nav isn't compatible with static header mode. Modern will set fixed mode on header.")),$("body").hasClass("hover-menu")&&!$("body").hasClass("page-sidebar-fixed")&&(u.click(),alert("Fixed sidebar isn't compatible with hover menu mode. Modern will set accordion mode on menu.")),$("body").toggleClass("page-sidebar-fixed"),$("body").hasClass(".page-sidebar-fixed")&&$(".page-sidebar-inner").slimScroll({destroy:!0}),$(".page-sidebar-inner").slimScroll(),c()},y=function(){$(".sidebar").toggleClass("horizontal-bar"),$(".sidebar").toggleClass("page-sidebar"),$("body").toggleClass("page-horizontal-bar"),$("body").hasClass("page-sidebar-fixed")&&!$("body").hasClass("page-header-fixed")&&(t.click(),alert("Static header isn't compatible with fixed horizontal nav mode. Modern will set static mode on horizontal nav.")),c()},C=function(){$(".page-content").toggleClass("container"),c()},v=function(){$("body").toggleClass("compact-menu"),c()},x=function(){!$("body").hasClass("hover-menu")&&$("body").hasClass("page-sidebar-fixed")&&(i.click(),alert("Fixed sidebar isn't compatible with hover menu mode. Modern will set static mode on sidebar.")),$("body").toggleClass("hover-menu"),c()};if($(".small-sidebar .navbar .logo-box a span").html($(".navbar .logo-box a span").text()==p?m:p),$(".theme-settings").length||$(".sidebar-toggle").click(function(){g()}),$(".theme-settings").length&&(t.onchange=function(){f()},i.onchange=function(){k()},l.onchange=function(){y()},d.onchange=function(){g()},h.onchange=function(){v()},u.onchange=function(){x()},r.onchange=function(){C()},$(".sidebar-toggle").click(function(){d.click()}),$(".reset-options").click(function(){b()}),$(".colorbox").click(function(){var e=$(this).attr("data-css");return $(".theme-color").attr("href","assets/css/themes/"+e+".css"),!1}),$("body").hasClass("page-sidebar-fixed")||1!=i.checked||$("body").addClass("page-sidebar-fixed"),$("body").hasClass("page-sidebar-fixed")&&0==i.checked&&$(".fixed-sidebar-check").prop("checked",!0),$("body").hasClass("page-header-fixed")||1!=t.checked||$("body").addClass("page-header-fixed"),$("body").hasClass("page-header-fixed")&&0==t.checked&&$(".fixed-header-check").prop("checked",!0),$("body").hasClass("page-horizontal-bar")||1!=l.checked||($("body").addClass("page-horizontal-bar"),$(".sidebar").addClass("horizontal-bar"),$(".sidebar").removeClass("page-sidebar")),$("body").hasClass("page-horizontal-bar")&&0==l.checked&&$(".horizontal-bar-check").prop("checked",!0),$("body").hasClass("small-sidebar")||1!=d.checked||$("body").addClass("small-sidebar"),$("body").hasClass("small-sidebar")&&0==d.checked&&$(".horizontal-bar-check").prop("checked",!0),$(".page-content").hasClass("container")||1!=r.checked||$(".toggle-sidebar-check").addClass("container"),$(".page-content").hasClass("container")&&0==r.checked&&$(".boxed-layout-check").prop("checked",!0),$(".page-content").hasClass("container")||1!=r.checked||$(".toggle-sidebar-check").addClass("container"),$(".page-content").hasClass("container")&&0==r.checked&&$(".boxed-layout-check").prop("checked",!0),$(".page-content").hasClass("container")||1!=r.checked||$(".toggle-sidebar-check").addClass("container"),$(".page-content").hasClass("container")&&0==r.checked&&$(".boxed-layout-check").prop("checked",!0)),$(".chat").length){{var w=document.getElementById("cbp-spmenu-s1"),S=document.getElementById("showRight"),z=document.getElementById("closeRight"),E=document.getElementById("cbp-spmenu-s2"),F=document.getElementById("closeRight2");document.body}S.onclick=function(){classie.toggle(w,"cbp-spmenu-open")},z.onclick=function(){classie.toggle(w,"cbp-spmenu-open")},F.onclick=function(){classie.toggle(E,"cbp-spmenu-open")},$(".showRight2").click(function(){classie.toggle(E,"cbp-spmenu-open")}),$(".chat-write form input").keypress(function(e){if(13==e.which&&0==!$(this).val().length)$('<div class="chat-item chat-item-right"><div class="chat-message">'+$(this).val()+"</div></div>").insertAfter(".chat .chat-item:last-child"),$(this).val("");else if(13==e.which)return;$(".chat").slimscroll({allowPageScroll:!0})})}}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | ["Child 1", { "id" : "demo_child_1", "text" : "Child 2", "children" : [ { "id" : "demo_child_2", "text" : "One more", "type" : "file" }] }] | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $(document).ready(function() { | ||
2 | |||
3 | var drag = function() { | ||
4 | $('.calendar-event').each(function() { | ||
5 | |||
6 | // store data so the calendar knows to render an event upon drop | ||
7 | $(this).data('event', { | ||
8 | title: $.trim($(this).text()), // use the element's text as the event title | ||
9 | stick: true // maintain when user navigates (see docs on the renderEvent method) | ||
10 | }); | ||
11 | |||
12 | // make the event draggable using jQuery UI | ||
13 | $(this).draggable({ | ||
14 | zIndex: 1111999, | ||
15 | revert: true, // will cause the event to go back to its | ||
16 | revertDuration: 0 // original position after the drag | ||
17 | }); | ||
18 | }); | ||
19 | }; | ||
20 | |||
21 | var removeEvent = function() { | ||
22 | $('.remove-calendar-event').click(function() { | ||
23 | $(this).closest('.calendar-event').fadeOut(); | ||
24 | return false; | ||
25 | }); | ||
26 | }; | ||
27 | |||
28 | // $(".add-event").keypress(function (e) { | ||
29 | // if ((e.which == 13)&&(!$(this).val().length == 0)) { | ||
30 | // $('<div class="calendar-event"><p>' + $(this).val() + '</p><a href="javascript:void(0);" class="remove-calendar-event"><i class="fa fa-remove"></i></a></div>').insertBefore(".add-event"); | ||
31 | // $(this).val(''); | ||
32 | // } else if(e.which == 13) { | ||
33 | // alert('Please enter event name'); | ||
34 | // } | ||
35 | // drag(); | ||
36 | // removeEvent(); | ||
37 | // }); | ||
38 | |||
39 | |||
40 | drag(); | ||
41 | removeEvent(); | ||
42 | |||
43 | var date = new Date(); | ||
44 | var day = date.getDate(); | ||
45 | var month = date.getMonth(); | ||
46 | var year = date.getFullYear(); | ||
47 | |||
48 | $('#calendar').fullCalendar({ | ||
49 | |||
50 | header: { | ||
51 | left: 'prev,next today', | ||
52 | center: 'title', | ||
53 | right: 'month,agendaWeek,agendaDay' | ||
54 | }, | ||
55 | editable: true, | ||
56 | droppable: true, // this allows things to be dropped onto the calendar | ||
57 | eventLimit: true, // allow "more" link when too many events | ||
58 | events: [ | ||
59 | { | ||
60 | title: 'All Day Event', | ||
61 | start: new Date(year, month, day-8) | ||
62 | }, | ||
63 | { | ||
64 | title: 'Long Event', | ||
65 | start: new Date(year, month, day-5), | ||
66 | end: new Date(year, month, day-2) | ||
67 | }, | ||
68 | { | ||
69 | id: 999, | ||
70 | title: 'Repeating Event', | ||
71 | start: new Date(year, month, day) | ||
72 | }, | ||
73 | { | ||
74 | id: 999, | ||
75 | title: 'Repeating Event', | ||
76 | start: new Date(year, month, day+7) | ||
77 | }, | ||
78 | { | ||
79 | title: 'Conference', | ||
80 | start: new Date(year, month, day+3), | ||
81 | end: new Date(year, month, day+6) | ||
82 | }, | ||
83 | { | ||
84 | title: 'Meeting', | ||
85 | start: new Date(year, month, day+5) | ||
86 | }, | ||
87 | { | ||
88 | title: 'Lunch', | ||
89 | start: new Date(year, month, day+7) | ||
90 | }, | ||
91 | { | ||
92 | title: 'Meeting', | ||
93 | start: new Date(year, month, day+10) | ||
94 | }, | ||
95 | { | ||
96 | title: 'Happy Hour', | ||
97 | start: new Date(year, month, day+10) | ||
98 | }, | ||
99 | { | ||
100 | title: 'Dinner', | ||
101 | start: new Date(year, month, day+13) | ||
102 | }, | ||
103 | { | ||
104 | title: 'Birthday Party', | ||
105 | start: new Date(year, month, day+15) | ||
106 | }, | ||
107 | { | ||
108 | title: 'Click for Google', | ||
109 | url: 'http://google.com/', | ||
110 | start: new Date(year, month, day+18) | ||
111 | } | ||
112 | ] | ||
113 | }); | ||
114 | |||
115 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $( document ).ready(function() { | ||
2 | |||
3 | var ctx1 = document.getElementById("chart1").getContext("2d"); | ||
4 | var data1 = { | ||
5 | labels: ["January", "February", "March", "April", "May", "June", "July"], | ||
6 | datasets: [ | ||
7 | { | ||
8 | label: "My First dataset", | ||
9 | fillColor: "rgba(220,220,220,0.2)", | ||
10 | strokeColor: "rgba(220,220,220,1)", | ||
11 | pointColor: "rgba(220,220,220,1)", | ||
12 | pointStrokeColor: "#fff", | ||
13 | pointHighlightFill: "#fff", | ||
14 | pointHighlightStroke: "rgba(220,220,220,1)", | ||
15 | data: [65, 59, 80, 81, 56, 55, 40] | ||
16 | }, | ||
17 | { | ||
18 | label: "My Second dataset", | ||
19 | fillColor: "rgba(34,186,160,0.2)", | ||
20 | strokeColor: "rgba(34,186,160,1)", | ||
21 | pointColor: "rgba(34,186,160,1)", | ||
22 | pointStrokeColor: "#fff", | ||
23 | pointHighlightFill: "#fff", | ||
24 | pointHighlightStroke: "rgba(18,175,203,1)", | ||
25 | data: [28, 48, 40, 19, 86, 27, 90] | ||
26 | } | ||
27 | ] | ||
28 | }; | ||
29 | |||
30 | var chart1 = new Chart(ctx1).Line(data1, { | ||
31 | scaleShowGridLines : true, | ||
32 | scaleGridLineColor : "rgba(0,0,0,.05)", | ||
33 | scaleGridLineWidth : 1, | ||
34 | scaleShowHorizontalLines: true, | ||
35 | scaleShowVerticalLines: true, | ||
36 | bezierCurve : true, | ||
37 | bezierCurveTension : 0.4, | ||
38 | pointDot : true, | ||
39 | pointDotRadius : 4, | ||
40 | pointDotStrokeWidth : 1, | ||
41 | pointHitDetectionRadius : 20, | ||
42 | datasetStroke : true, | ||
43 | datasetStrokeWidth : 2, | ||
44 | datasetFill : true, | ||
45 | legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].strokeColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>", | ||
46 | responsive: true | ||
47 | }); | ||
48 | |||
49 | var ctx2 = document.getElementById("chart2").getContext("2d"); | ||
50 | var data2 = { | ||
51 | labels: ["January", "February", "March", "April", "May", "June", "July"], | ||
52 | datasets: [ | ||
53 | { | ||
54 | label: "My First dataset", | ||
55 | fillColor: "rgba(220,220,220,0.5)", | ||
56 | strokeColor: "rgba(220,220,220,0.8)", | ||
57 | highlightFill: "rgba(220,220,220,0.75)", | ||
58 | highlightStroke: "rgba(220,220,220,1)", | ||
59 | data: [65, 59, 80, 81, 56, 55, 40] | ||
60 | }, | ||
61 | { | ||
62 | label: "My Second dataset", | ||
63 | fillColor: "rgba(34,186,160,0.5)", | ||
64 | strokeColor: "rgba(34,186,160,0.8)", | ||
65 | highlightFill: "rgba(34,186,160,0.75)", | ||
66 | highlightStroke: "rgba(34,186,160,1)", | ||
67 | data: [28, 48, 40, 19, 86, 27, 90] | ||
68 | } | ||
69 | ] | ||
70 | }; | ||
71 | |||
72 | var chart2 = new Chart(ctx2).Bar(data2, { | ||
73 | scaleBeginAtZero : true, | ||
74 | scaleShowGridLines : true, | ||
75 | scaleGridLineColor : "rgba(0,0,0,.05)", | ||
76 | scaleGridLineWidth : 1, | ||
77 | scaleShowHorizontalLines: true, | ||
78 | scaleShowVerticalLines: true, | ||
79 | barShowStroke : true, | ||
80 | barStrokeWidth : 2, | ||
81 | barDatasetSpacing : 1, | ||
82 | legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].fillColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>", | ||
83 | responsive: true | ||
84 | }); | ||
85 | |||
86 | var ctx3 = document.getElementById("chart3").getContext("2d"); | ||
87 | var data3 = [ | ||
88 | { | ||
89 | value: 300, | ||
90 | color:"#F25656", | ||
91 | highlight: "#FD7A7A", | ||
92 | label: "Red" | ||
93 | }, | ||
94 | { | ||
95 | value: 50, | ||
96 | color: "#22BAA0", | ||
97 | highlight: "#36E7C8", | ||
98 | label: "Green" | ||
99 | }, | ||
100 | { | ||
101 | value: 100, | ||
102 | color: "#F2CA4C", | ||
103 | highlight: "#FBDB6E", | ||
104 | label: "Yellow" | ||
105 | } | ||
106 | ]; | ||
107 | |||
108 | var myPieChart = new Chart(ctx3).Pie(data3,{ | ||
109 | segmentShowStroke : true, | ||
110 | segmentStrokeColor : "#fff", | ||
111 | segmentStrokeWidth : 2, | ||
112 | animationSteps : 100, | ||
113 | animationEasing : "easeOutBounce", | ||
114 | animateRotate : true, | ||
115 | animateScale : false, | ||
116 | legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>", | ||
117 | responsive: true | ||
118 | }); | ||
119 | |||
120 | var ctx4 = document.getElementById("chart4").getContext("2d"); | ||
121 | var data4 = [ | ||
122 | { | ||
123 | value: 300, | ||
124 | color:"#F25656", | ||
125 | highlight: "#FD7A7A", | ||
126 | label: "Red" | ||
127 | }, | ||
128 | { | ||
129 | value: 50, | ||
130 | color: "#22BAA0", | ||
131 | highlight: "#36E7C8", | ||
132 | label: "Green" | ||
133 | }, | ||
134 | { | ||
135 | value: 100, | ||
136 | color: "#F2CA4C", | ||
137 | highlight: "#FBDB6E", | ||
138 | label: "Yellow" | ||
139 | } | ||
140 | ]; | ||
141 | |||
142 | var myDoughnutChart = new Chart(ctx4).Doughnut(data4,{ | ||
143 | segmentShowStroke : true, | ||
144 | segmentStrokeColor : "#fff", | ||
145 | segmentStrokeWidth : 2, | ||
146 | animationSteps : 100, | ||
147 | animationEasing : "easeOutBounce", | ||
148 | animateRotate : true, | ||
149 | animateScale : false, | ||
150 | legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>", | ||
151 | responsive: true | ||
152 | }); | ||
153 | |||
154 | var ctx5 = document.getElementById("chart5").getContext("2d"); | ||
155 | var data5 = [ | ||
156 | { | ||
157 | value: 300, | ||
158 | color:"#F25656", | ||
159 | highlight: "#FD7A7A", | ||
160 | label: "Red" | ||
161 | }, | ||
162 | { | ||
163 | value: 50, | ||
164 | color: "#22BAA0", | ||
165 | highlight: "#36E7C8", | ||
166 | label: "Green" | ||
167 | }, | ||
168 | { | ||
169 | value: 100, | ||
170 | color: "#F2CA4C", | ||
171 | highlight: "#FBDB6E", | ||
172 | label: "Yellow" | ||
173 | }, | ||
174 | { | ||
175 | value: 40, | ||
176 | color: "#949FB1", | ||
177 | highlight: "#A8B3C5", | ||
178 | label: "Grey" | ||
179 | } | ||
180 | |||
181 | ]; | ||
182 | |||
183 | var myPolarArea = new Chart(ctx5).PolarArea(data5, { | ||
184 | scaleShowLabelBackdrop : true, | ||
185 | scaleBackdropColor : "rgba(255,255,255,0.75)", | ||
186 | scaleBeginAtZero : true, | ||
187 | scaleBackdropPaddingY : 2, | ||
188 | scaleBackdropPaddingX : 2, | ||
189 | scaleShowLine : true, | ||
190 | segmentShowStroke : true, | ||
191 | segmentStrokeColor : "#fff", | ||
192 | segmentStrokeWidth : 2, | ||
193 | animationSteps : 100, | ||
194 | animationEasing : "easeOutBounce", | ||
195 | animateRotate : true, | ||
196 | animateScale : false, | ||
197 | legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>", | ||
198 | responsive: true | ||
199 | }); | ||
200 | |||
201 | var ctx6 = document.getElementById("chart6").getContext("2d"); | ||
202 | var data6 = { | ||
203 | labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"], | ||
204 | datasets: [ | ||
205 | { | ||
206 | label: "My First dataset", | ||
207 | fillColor: "rgba(220,220,220,0.2)", | ||
208 | strokeColor: "rgba(220,220,220,1)", | ||
209 | pointColor: "rgba(220,220,220,1)", | ||
210 | pointStrokeColor: "#fff", | ||
211 | pointHighlightFill: "#fff", | ||
212 | pointHighlightStroke: "rgba(220,220,220,1)", | ||
213 | data: [65, 59, 90, 81, 56, 55, 40] | ||
214 | }, | ||
215 | { | ||
216 | label: "My Second dataset", | ||
217 | fillColor: "rgba(18,175,203,0.2)", | ||
218 | strokeColor: "rgba(18,175,203,1)", | ||
219 | pointColor: "rgba(18,175,203,1)", | ||
220 | pointStrokeColor: "#fff", | ||
221 | pointHighlightFill: "#fff", | ||
222 | pointHighlightStroke: "rgba(151,187,205,1)", | ||
223 | data: [28, 48, 40, 19, 96, 27, 100] | ||
224 | } | ||
225 | ] | ||
226 | }; | ||
227 | |||
228 | var myRadarChart = new Chart(ctx6).Radar(data6, { | ||
229 | scaleShowLine : true, | ||
230 | angleShowLineOut : true, | ||
231 | scaleShowLabels : false, | ||
232 | scaleBeginAtZero : true, | ||
233 | angleLineColor : "rgba(0,0,0,.1)", | ||
234 | angleLineWidth : 1, | ||
235 | pointLabelFontFamily : "'Arial'", | ||
236 | pointLabelFontStyle : "normal", | ||
237 | pointLabelFontSize : 10, | ||
238 | pointLabelFontColor : "#666", | ||
239 | pointDot : true, | ||
240 | pointDotRadius : 3, | ||
241 | pointDotStrokeWidth : 1, | ||
242 | pointHitDetectionRadius : 20, | ||
243 | datasetStroke : true, | ||
244 | datasetStrokeWidth : 2, | ||
245 | datasetFill : true, | ||
246 | legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].strokeColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>", | ||
247 | responsive: true | ||
248 | }); | ||
249 | |||
250 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $(document).ready(function () { | ||
2 | |||
3 | var flot1 = function () { | ||
4 | var data = [[0, 11], [1, 15], [2, 25], [3, 24], [4, 13], [5, 18]]; | ||
5 | var dataset = [{ | ||
6 | data: data, | ||
7 | color: "#22BAA0" | ||
8 | }]; | ||
9 | var ticks = [[0, "1"], [1, "2"], [2, "3"], [3, "4"], [4, "5"], [5, "6"]]; | ||
10 | |||
11 | var options = { | ||
12 | series: { | ||
13 | bars: { | ||
14 | show: true | ||
15 | } | ||
16 | }, | ||
17 | bars: { | ||
18 | align: "center", | ||
19 | barWidth: 0.5 | ||
20 | }, | ||
21 | xaxis: { | ||
22 | ticks: ticks | ||
23 | }, | ||
24 | legend: { | ||
25 | show: false | ||
26 | }, | ||
27 | grid: { | ||
28 | color: "#AFAFAF", | ||
29 | hoverable: true, | ||
30 | borderWidth: 0, | ||
31 | backgroundColor: '#FFF' | ||
32 | }, | ||
33 | tooltip: true, | ||
34 | tooltipOpts: { | ||
35 | content: "X: %x, Y: %y", | ||
36 | defaultTheme: false | ||
37 | } | ||
38 | }; | ||
39 | $.plot($("#flot1"), dataset, options); | ||
40 | }; | ||
41 | |||
42 | var flot2 = function () { | ||
43 | var data = [[0, 11], [1, 15], [2, 25], [3, 24], [4, 13], [5, 18]]; | ||
44 | var dataset = [{ | ||
45 | data: data, | ||
46 | color: "#22BAA0" | ||
47 | }]; | ||
48 | var ticks = [[0, "1"], [1, "2"], [2, "3"], [3, "4"], [4, "5"], [5, "6"]]; | ||
49 | |||
50 | var options = { | ||
51 | series: { | ||
52 | lines: { | ||
53 | show: true | ||
54 | } | ||
55 | }, | ||
56 | bars: { | ||
57 | align: "center", | ||
58 | barWidth: 0.5 | ||
59 | }, | ||
60 | xaxis: { | ||
61 | ticks: ticks | ||
62 | }, | ||
63 | legend: { | ||
64 | show: false | ||
65 | }, | ||
66 | grid: { | ||
67 | color: "#AFAFAF", | ||
68 | hoverable: true, | ||
69 | borderWidth: 0, | ||
70 | backgroundColor: '#FFF' | ||
71 | }, | ||
72 | tooltip: true, | ||
73 | tooltipOpts: { | ||
74 | content: "X: %x, Y: %y", | ||
75 | defaultTheme: false | ||
76 | } | ||
77 | }; | ||
78 | $.plot($("#flot2"), dataset, options); | ||
79 | }; | ||
80 | |||
81 | var flot3 = function () { | ||
82 | var data = [{ | ||
83 | label: "1", | ||
84 | data: 42, | ||
85 | color: "#22BAA0", | ||
86 | }, { | ||
87 | label: "2", | ||
88 | data: 23, | ||
89 | color: "#5FE8D0", | ||
90 | }, { | ||
91 | label: "3", | ||
92 | data: 35, | ||
93 | color: "#E2E2E2", | ||
94 | }]; | ||
95 | var options = { | ||
96 | series: { | ||
97 | pie: { | ||
98 | show: true | ||
99 | } | ||
100 | }, | ||
101 | legend: { | ||
102 | labelFormatter: function(label, series){ | ||
103 | return '<span class="pie-chart-legend">'+label+'</span>'; | ||
104 | } | ||
105 | }, | ||
106 | grid: { | ||
107 | hoverable: true | ||
108 | }, | ||
109 | tooltip: true, | ||
110 | tooltipOpts: { | ||
111 | content: "%p.0%, %s", | ||
112 | shifts: { | ||
113 | x: 20, | ||
114 | y: 0 | ||
115 | }, | ||
116 | defaultTheme: false | ||
117 | } | ||
118 | }; | ||
119 | $.plot($("#flot3"), data, options); | ||
120 | }; | ||
121 | |||
122 | var flot4 = function () { | ||
123 | |||
124 | // We use an inline data source in the example, usually data would | ||
125 | // be fetched from a server | ||
126 | |||
127 | var data = [], | ||
128 | totalPoints = 300; | ||
129 | |||
130 | function getRandomData() { | ||
131 | |||
132 | if (data.length > 0) | ||
133 | data = data.slice(1); | ||
134 | |||
135 | // Do a random walk | ||
136 | |||
137 | while (data.length < totalPoints) { | ||
138 | |||
139 | var prev = data.length > 0 ? data[data.length - 1] : 50, | ||
140 | y = prev + Math.random() * 10 - 5; | ||
141 | |||
142 | if (y < 0) { | ||
143 | y = 0; | ||
144 | } else if (y > 100) { | ||
145 | y = 100; | ||
146 | } | ||
147 | |||
148 | data.push(y); | ||
149 | } | ||
150 | |||
151 | // Zip the generated y values with the x values | ||
152 | |||
153 | var res = []; | ||
154 | for (var i = 0; i < data.length; ++i) { | ||
155 | res.push([i, data[i]]) | ||
156 | } | ||
157 | |||
158 | return res; | ||
159 | } | ||
160 | |||
161 | var plot4 = $.plot("#flot4", [ getRandomData() ], { | ||
162 | series: { | ||
163 | shadowSize: 0 // Drawing is faster without shadows | ||
164 | }, | ||
165 | yaxis: { | ||
166 | min: 0, | ||
167 | max: 100 | ||
168 | }, | ||
169 | xaxis: { | ||
170 | show: false | ||
171 | }, | ||
172 | colors: ["#22BAA0"], | ||
173 | legend: { | ||
174 | show: false | ||
175 | }, | ||
176 | grid: { | ||
177 | color: "#AFAFAF", | ||
178 | hoverable: true, | ||
179 | borderWidth: 0, | ||
180 | backgroundColor: '#FFF' | ||
181 | }, | ||
182 | tooltip: true, | ||
183 | tooltipOpts: { | ||
184 | content: "Y: %y", | ||
185 | defaultTheme: false | ||
186 | } | ||
187 | }); | ||
188 | |||
189 | function update() { | ||
190 | plot4.setData([getRandomData()]); | ||
191 | |||
192 | plot4.draw(); | ||
193 | setTimeout(update, 30); | ||
194 | } | ||
195 | |||
196 | update(); | ||
197 | |||
198 | }; | ||
199 | |||
200 | flot1(); | ||
201 | flot2(); | ||
202 | flot3(); | ||
203 | flot4(); | ||
204 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $( document ).ready(function() { | ||
2 | Morris.Area({ | ||
3 | element: 'morris1', | ||
4 | data: [ | ||
5 | {period: '2010 Q1', iphone: 2666, ipad: null, itouch: 2647}, | ||
6 | {period: '2010 Q2', iphone: 2778, ipad: 2294, itouch: 2441}, | ||
7 | {period: '2010 Q3', iphone: 4912, ipad: 1969, itouch: 2501}, | ||
8 | {period: '2010 Q4', iphone: 3767, ipad: 3597, itouch: 5689}, | ||
9 | {period: '2011 Q1', iphone: 6810, ipad: 1914, itouch: 2293}, | ||
10 | {period: '2011 Q2', iphone: 5670, ipad: 4293, itouch: 1881}, | ||
11 | {period: '2011 Q3', iphone: 4820, ipad: 3795, itouch: 1588}, | ||
12 | {period: '2011 Q4', iphone: 15073, ipad: 5967, itouch: 5175}, | ||
13 | {period: '2012 Q1', iphone: 10687, ipad: 4460, itouch: 2028}, | ||
14 | {period: '2012 Q2', iphone: 8432, ipad: 5713, itouch: 1791} | ||
15 | ], | ||
16 | xkey: 'period', | ||
17 | ykeys: ['iphone', 'ipad', 'itouch'], | ||
18 | labels: ['iPhone', 'iPad', 'iPod Touch'], | ||
19 | hideHover: 'auto', | ||
20 | lineColors: ['#8adfd0', '#6ad6c3','#22BAA0'], | ||
21 | resize: true, | ||
22 | }); | ||
23 | |||
24 | Morris.Bar({ | ||
25 | element: 'morris2', | ||
26 | data: [ | ||
27 | { year: '2006', a: 25, b: 15 }, | ||
28 | { year: '2007', a: 50, b: 40 }, | ||
29 | { year: '2008', a: 75, b: 65 }, | ||
30 | { year: '2009', a: 100, b: 90 }, | ||
31 | { year: '2010', a: 60, b: 50 }, | ||
32 | { year: '2011', a: 75, b: 65 }, | ||
33 | { year: '2012', a: 100, b: 90 } | ||
34 | ], | ||
35 | xkey: 'year', | ||
36 | ykeys: ['a', 'b'], | ||
37 | labels: ['a', 'b'], | ||
38 | barRatio: 0.4, | ||
39 | xLabelAngle: 35, | ||
40 | hideHover: 'auto', | ||
41 | barColors: ['#6ad6c3','#22BAA0'], | ||
42 | resize: true | ||
43 | }); | ||
44 | |||
45 | Morris.Line({ | ||
46 | element: 'morris3', | ||
47 | data: [ | ||
48 | { year: '2006', a: 25, b: 15 }, | ||
49 | { year: '2007', a: 50, b: 40 }, | ||
50 | { year: '2008', a: 75, b: 65 }, | ||
51 | { year: '2009', a: 100, b: 90 }, | ||
52 | { year: '2010', a: 60, b: 50 }, | ||
53 | { year: '2011', a: 75, b: 65 }, | ||
54 | { year: '2012', a: 100, b: 90 } | ||
55 | ], | ||
56 | xkey: 'year', | ||
57 | ykeys: ['a', 'b'], | ||
58 | labels: ['a', 'b'], | ||
59 | resize: true, | ||
60 | lineColors: ['#6ad6c3','#22BAA0'] | ||
61 | }); | ||
62 | |||
63 | Morris.Donut({ | ||
64 | element: 'morris4', | ||
65 | data: [ | ||
66 | {label: 'Javascript', value: 35 }, | ||
67 | {label: 'HTML5', value: 45 }, | ||
68 | {label: 'CSS3', value: 30 }, | ||
69 | {label: 'PHP', value: 20 } | ||
70 | ], | ||
71 | resize: true, | ||
72 | colors: ['#74e4d1', '#44cbb4', '#119d85','#22BAA0'], | ||
73 | }); | ||
74 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $( document ).ready(function() { | ||
2 | var graph1 = new Rickshaw.Graph( { | ||
3 | element: document.querySelector("#rickshaw1"), | ||
4 | series: [{ | ||
5 | color: '#22BAA0', | ||
6 | data: [ | ||
7 | { x: 0, y: 40 }, | ||
8 | { x: 1, y: 49 }, | ||
9 | { x: 2, y: 38 }, | ||
10 | { x: 3, y: 30 }, | ||
11 | { x: 4, y: 32 } ] | ||
12 | }] | ||
13 | }); | ||
14 | |||
15 | graph1.render(); | ||
16 | |||
17 | var graph2 = new Rickshaw.Graph( { | ||
18 | element: document.querySelector("#rickshaw2"), | ||
19 | renderer: 'area', | ||
20 | stroke: true, | ||
21 | series: [ { | ||
22 | data: [ | ||
23 | { x: 0, y: 40 }, | ||
24 | { x: 1, y: 49 }, | ||
25 | { x: 2, y: 38 }, | ||
26 | { x: 3, y: 30 }, | ||
27 | { x: 4, y: 32 } | ||
28 | ], | ||
29 | color: '#22BAA0' | ||
30 | }, { | ||
31 | data: [ | ||
32 | { x: 0, y: 40 }, | ||
33 | { x: 1, y: 49 }, | ||
34 | { x: 2, y: 38 }, | ||
35 | { x: 3, y: 30 }, | ||
36 | { x: 4, y: 32 } | ||
37 | ], | ||
38 | color: '#E9E9E9' | ||
39 | }] | ||
40 | }); | ||
41 | |||
42 | graph2.render(); | ||
43 | |||
44 | var graph3 = new Rickshaw.Graph({ | ||
45 | element: document.querySelector("#rickshaw3"), | ||
46 | renderer: 'line', | ||
47 | series: [{ | ||
48 | data: [ | ||
49 | { x: 0, y: 40 }, | ||
50 | { x: 1, y: 49 }, | ||
51 | { x: 2, y: 38 }, | ||
52 | { x: 3, y: 30 }, | ||
53 | { x: 4, y: 32 } | ||
54 | ], | ||
55 | color: '#22BAA0' | ||
56 | }] | ||
57 | }); | ||
58 | |||
59 | graph3.render(); | ||
60 | |||
61 | var graph4 = new Rickshaw.Graph({ | ||
62 | element: document.querySelector("#rickshaw4"), | ||
63 | renderer: 'line', | ||
64 | series: [{ | ||
65 | data: [ | ||
66 | { x: 0, y: 40 }, | ||
67 | { x: 1, y: 49 }, | ||
68 | { x: 2, y: 38 }, | ||
69 | { x: 3, y: 30 }, | ||
70 | { x: 4, y: 32 } | ||
71 | ], | ||
72 | color: '#22BAA0' | ||
73 | }, { | ||
74 | data: [ | ||
75 | { x: 0, y: 20 }, | ||
76 | { x: 1, y: 24 }, | ||
77 | { x: 2, y: 19 }, | ||
78 | { x: 3, y: 15 }, | ||
79 | { x: 4, y: 16 } | ||
80 | ], | ||
81 | color: '#E9E9E9' | ||
82 | }] | ||
83 | }); | ||
84 | |||
85 | graph4.render(); | ||
86 | |||
87 | var graph5 = new Rickshaw.Graph({ | ||
88 | element: document.querySelector("#rickshaw5"), | ||
89 | renderer: 'bar', | ||
90 | series: [{ | ||
91 | data: [ | ||
92 | { x: 0, y: 40 }, | ||
93 | { x: 1, y: 49 }, | ||
94 | { x: 2, y: 38 }, | ||
95 | { x: 3, y: 30 }, | ||
96 | { x: 4, y: 32 } | ||
97 | ], | ||
98 | color: '#22BAA0' | ||
99 | }] | ||
100 | }); | ||
101 | |||
102 | graph5.render(); | ||
103 | |||
104 | var graph6 = new Rickshaw.Graph( { | ||
105 | element: document.querySelector("#rickshaw6"), | ||
106 | renderer: 'bar', | ||
107 | series: [ | ||
108 | { | ||
109 | data: [ { x: 0, y: 40 }, { x: 1, y: 49 }, { x: 2, y: 38 }, { x: 3, y: 30 }, { x: 4, y: 32 } ], | ||
110 | color: '#22BAA0' | ||
111 | }, { | ||
112 | data: [ { x: 0, y: 20 }, { x: 1, y: 24 }, { x: 2, y: 19 }, { x: 3, y: 15 }, { x: 4, y: 16 } ], | ||
113 | color: '#E9E9E9' | ||
114 | } ] | ||
115 | }); | ||
116 | |||
117 | graph6.render(); | ||
118 | |||
119 | var graph7 = new Rickshaw.Graph( { | ||
120 | element: document.querySelector("#rickshaw7"), | ||
121 | renderer: 'bar', | ||
122 | stack: false, | ||
123 | series: [{ | ||
124 | data: [ | ||
125 | { x: 0, y: 40 }, | ||
126 | { x: 1, y: 49 }, | ||
127 | { x: 2, y: 38 }, | ||
128 | { x: 3, y: 30 }, | ||
129 | { x: 4, y: 32 } | ||
130 | ], | ||
131 | color: '#22BAA0' | ||
132 | }, { | ||
133 | data: [ | ||
134 | { x: 0, y: 20 }, | ||
135 | { x: 1, y: 24 }, | ||
136 | { x: 2, y: 19 }, | ||
137 | { x: 3, y: 15 }, | ||
138 | { x: 4, y: 16 } | ||
139 | ], | ||
140 | color: '#E9E9E9' | ||
141 | }] | ||
142 | }); | ||
143 | |||
144 | graph7.render(); | ||
145 | |||
146 | var graph8 = new Rickshaw.Graph( { | ||
147 | element: document.querySelector("#rickshaw8"), | ||
148 | renderer: 'scatterplot', | ||
149 | stroke: true, | ||
150 | max: 50, | ||
151 | series: [{ | ||
152 | data: [ | ||
153 | { x: 0, y: 22 }, | ||
154 | { x: 1, y: 26 }, | ||
155 | { x: 2, y: 30 }, | ||
156 | { x: 3, y: 28 }, | ||
157 | { x: 4, y: 31 }, | ||
158 | { x: 5, y: 35 }, | ||
159 | { x: 6, y: 38 }, | ||
160 | { x: 7, y: 42 }, | ||
161 | { x: 8, y: 34 }, | ||
162 | { x: 9, y: 27 }, | ||
163 | { x: 10, y: 26 } | ||
164 | ], | ||
165 | color: '#22BAA0' | ||
166 | }] | ||
167 | }); | ||
168 | |||
169 | graph8.render(); | ||
170 | |||
171 | |||
172 | var seriesData = [ [], [], [], [], [], [], [], [], [] ]; | ||
173 | var random = new Rickshaw.Fixtures.RandomData(150); | ||
174 | |||
175 | for (var i = 0; i < 150; i++) { | ||
176 | random.addData(seriesData); | ||
177 | } | ||
178 | |||
179 | var graph9 = new Rickshaw.Graph( { | ||
180 | element: document.querySelector("#rickshaw9"), | ||
181 | renderer: 'area', | ||
182 | stroke: true, | ||
183 | preserve: true, | ||
184 | series: [ | ||
185 | { | ||
186 | color: '#22BAA0', | ||
187 | data: seriesData[0], | ||
188 | name: 'Moscow' | ||
189 | }, { | ||
190 | color: '#E9E9E9', | ||
191 | data: seriesData[1], | ||
192 | name: 'Shanghai' | ||
193 | } | ||
194 | ] | ||
195 | }); | ||
196 | |||
197 | graph9.render(); | ||
198 | |||
199 | setInterval( function() { | ||
200 | random.removeData(seriesData); | ||
201 | random.addData(seriesData); | ||
202 | graph9.update(); | ||
203 | }, 300 ); | ||
204 | |||
205 | $(window).resize(function(){ | ||
206 | graph9.render(); | ||
207 | }); | ||
208 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $( document ).ready(function() { | ||
2 | |||
3 | var DrawSparkline = function() { | ||
4 | $('#sparkline1').sparkline([0, 23, 43, 35, 44, 45, 56, 37, 40], { | ||
5 | type: 'line', | ||
6 | width: $('#sparkline1').width(), | ||
7 | height: '165', | ||
8 | chartRangeMax: 50, | ||
9 | lineColor: '#ebcc3a', | ||
10 | fillColor: 'rgba(235,204,58,0.3)', | ||
11 | highlightLineColor: 'rgba(0,0,0,.1)', | ||
12 | highlightSpotColor: 'rgba(0,0,0,.2)', | ||
13 | }); | ||
14 | |||
15 | $('#sparkline1').sparkline([25, 23, 26, 24, 25, 32, 30, 24, 19], { | ||
16 | type: 'line', | ||
17 | width: $('#sparkline1').width(), | ||
18 | height: '165', | ||
19 | chartRangeMax: 40, | ||
20 | lineColor: '#EB3737', | ||
21 | fillColor: 'rgba(242,86,86,0.3)', | ||
22 | composite: true, | ||
23 | highlightLineColor: 'rgba(0,0,0,.1)', | ||
24 | highlightSpotColor: 'rgba(0,0,0,.2)', | ||
25 | }); | ||
26 | |||
27 | $('#sparkline2').sparkline([3, 6, 7, 8, 6, 4, 7, 10, 12, 7, 4, 9, 12, 13, 11, 12], { | ||
28 | type: 'bar', | ||
29 | height: '165', | ||
30 | barWidth: '10', | ||
31 | barSpacing: '3', | ||
32 | barColor: '#7A6FBE' | ||
33 | }); | ||
34 | |||
35 | $('#sparkline3').sparkline([20, 40, 30, 10], { | ||
36 | type: 'pie', | ||
37 | width: '165', | ||
38 | height: '165', | ||
39 | sliceColors: ['#7a6fbe', '#61c5e3', '#343F47', '#f6d433'] | ||
40 | }); | ||
41 | |||
42 | $('#sparkline4').sparkline([0, 23, 43, 35, 44, 45, 56, 37, 40], { | ||
43 | type: 'line', | ||
44 | width: $('#sparkline1').width(), | ||
45 | height: '165', | ||
46 | chartRangeMax: 50, | ||
47 | lineColor: '#ebcc3a', | ||
48 | fillColor: 'transparent', | ||
49 | highlightLineColor: 'rgba(0,0,0,.1)', | ||
50 | highlightSpotColor: 'rgba(0,0,0,.2)' | ||
51 | }); | ||
52 | |||
53 | $('#sparkline4').sparkline([25, 23, 26, 24, 25, 32, 30, 24, 19], { | ||
54 | type: 'line', | ||
55 | width: $('#sparkline1').width(), | ||
56 | height: '165', | ||
57 | chartRangeMax: 40, | ||
58 | lineColor: '#EB3737', | ||
59 | fillColor: 'transparent', | ||
60 | composite: true, | ||
61 | highlightLineColor: 'rgba(0,0,0,.1)', | ||
62 | highlightSpotColor: 'rgba(0,0,0,.2)' | ||
63 | }); | ||
64 | |||
65 | $('#sparkline6').sparkline([3, 6, 7, 8, 6, 4, 7, 10, 12, 7, 4, 9, 12, 13, 11, 12], { | ||
66 | type: 'bar', | ||
67 | height: '165', | ||
68 | barWidth: '10', | ||
69 | barSpacing: '3', | ||
70 | barColor: '#8DDFF6' | ||
71 | }); | ||
72 | |||
73 | $('#sparkline6').sparkline([3, 6, 7, 8, 6, 4, 7, 10, 12, 7, 4, 9, 12, 13, 11, 12], { | ||
74 | type: 'line', | ||
75 | width: $('#sparkline1').width(), | ||
76 | height: '165', | ||
77 | lineColor: '#F25656', | ||
78 | fillColor: 'transparent', | ||
79 | composite: true, | ||
80 | highlightLineColor: 'rgba(0,0,0,.1)', | ||
81 | highlightSpotColor: 'rgba(0,0,0,.2)' | ||
82 | }); | ||
83 | |||
84 | }, | ||
85 | DrawMouseSpeed = function () { | ||
86 | var mrefreshinterval = 500; // update display every 500ms | ||
87 | var lastmousex=-1; | ||
88 | var lastmousey=-1; | ||
89 | var lastmousetime; | ||
90 | var mousetravel = 0; | ||
91 | var mpoints = []; | ||
92 | var mpoints_max = 30; | ||
93 | $('html').mousemove(function(e) { | ||
94 | var mousex = e.pageX; | ||
95 | var mousey = e.pageY; | ||
96 | if (lastmousex > -1) { | ||
97 | mousetravel += Math.max( Math.abs(mousex-lastmousex), Math.abs(mousey-lastmousey) ); | ||
98 | } | ||
99 | lastmousex = mousex; | ||
100 | lastmousey = mousey; | ||
101 | }); | ||
102 | var mdraw = function() { | ||
103 | var md = new Date(); | ||
104 | var timenow = md.getTime(); | ||
105 | if (lastmousetime && lastmousetime!=timenow) { | ||
106 | var pps = Math.round(mousetravel / (timenow - lastmousetime) * 1000); | ||
107 | mpoints.push(pps); | ||
108 | if (mpoints.length > mpoints_max) | ||
109 | mpoints.splice(0,1); | ||
110 | mousetravel = 0; | ||
111 | $('#sparkline5').sparkline(mpoints, { | ||
112 | tooltipSuffix: ' pixels per second', | ||
113 | type: 'line', | ||
114 | width: $('#sparkline1').width(), | ||
115 | height: '165', | ||
116 | chartRangeMax: 50, | ||
117 | lineColor: '#22BAA0', | ||
118 | fillColor: 'rgba(34,186,160,0.3)', | ||
119 | highlightLineColor: 'rgba(24,147,126,.1)', | ||
120 | highlightSpotColor: 'rgba(24,147,126,.2)', | ||
121 | }); | ||
122 | } | ||
123 | lastmousetime = timenow; | ||
124 | setTimeout(mdraw, mrefreshinterval); | ||
125 | } | ||
126 | // We could use setInterval instead, but I prefer to do it this way | ||
127 | setTimeout(mdraw, mrefreshinterval); | ||
128 | }; | ||
129 | |||
130 | DrawSparkline(); | ||
131 | DrawMouseSpeed(); | ||
132 | |||
133 | var resizeChart; | ||
134 | |||
135 | $(window).resize(function(e) { | ||
136 | clearTimeout(resizeChart); | ||
137 | resizeChart = setTimeout(function() { | ||
138 | DrawSparkline(); | ||
139 | DrawMouseSpeed(); | ||
140 | }, 300); | ||
141 | }); | ||
142 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $( document ).ready(function() { | ||
2 | function initialize() { | ||
3 | var mapOptions = { | ||
4 | center: new google.maps.LatLng(27.284836,-81.075513), | ||
5 | zoom: 9 | ||
6 | }; | ||
7 | var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); | ||
8 | } | ||
9 | google.maps.event.addDomListener(window, 'load', initialize); | ||
10 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $( document ).ready(function() { | ||
2 | |||
3 | // CounterUp Plugin | ||
4 | $('.counter').counterUp({ | ||
5 | delay: 10, | ||
6 | time: 1000 | ||
7 | }); | ||
8 | |||
9 | setTimeout(function() { | ||
10 | toastr.options = { | ||
11 | closeButton: true, | ||
12 | progressBar: true, | ||
13 | showMethod: 'fadeIn', | ||
14 | hideMethod: 'fadeOut', | ||
15 | timeOut: 5000 | ||
16 | }; | ||
17 | toastr.success('Checkout settings menu on left!', 'Welcome to Modern!'); | ||
18 | }, 1800); | ||
19 | |||
20 | var flot2 = function () { | ||
21 | |||
22 | // We use an inline data source in the example, usually data would | ||
23 | // be fetched from a server | ||
24 | |||
25 | var data = [], | ||
26 | totalPoints = 100; | ||
27 | |||
28 | function getRandomData() { | ||
29 | |||
30 | if (data.length > 0) | ||
31 | data = data.slice(1); | ||
32 | |||
33 | // Do a random walk | ||
34 | |||
35 | while (data.length < totalPoints) { | ||
36 | |||
37 | var prev = data.length > 0 ? data[data.length - 1] : 50, | ||
38 | y = prev + Math.random() * 10 - 5; | ||
39 | |||
40 | if (y < 0) { | ||
41 | y = 0; | ||
42 | } else if (y > 100) { | ||
43 | y = 100; | ||
44 | } | ||
45 | |||
46 | data.push(y); | ||
47 | } | ||
48 | |||
49 | // Zip the generated y values with the x values | ||
50 | |||
51 | var res = []; | ||
52 | for (var i = 0; i < data.length; ++i) { | ||
53 | res.push([i, data[i]]) | ||
54 | } | ||
55 | |||
56 | return res; | ||
57 | } | ||
58 | |||
59 | var plot2 = $.plot("#flotchart2", [ getRandomData() ], { | ||
60 | series: { | ||
61 | shadowSize: 0 // Drawing is faster without shadows | ||
62 | }, | ||
63 | yaxis: { | ||
64 | min: 0, | ||
65 | max: 100 | ||
66 | }, | ||
67 | xaxis: { | ||
68 | show: false | ||
69 | }, | ||
70 | colors: ["#22BAA0"], | ||
71 | legend: { | ||
72 | show: false | ||
73 | }, | ||
74 | grid: { | ||
75 | color: "#AFAFAF", | ||
76 | hoverable: true, | ||
77 | borderWidth: 0, | ||
78 | backgroundColor: '#FFF' | ||
79 | }, | ||
80 | tooltip: true, | ||
81 | tooltipOpts: { | ||
82 | content: "Y: %y", | ||
83 | defaultTheme: false | ||
84 | } | ||
85 | }); | ||
86 | |||
87 | function update() { | ||
88 | plot2.setData([getRandomData()]); | ||
89 | |||
90 | plot2.draw(); | ||
91 | setTimeout(update, 30); | ||
92 | } | ||
93 | |||
94 | update(); | ||
95 | |||
96 | }; | ||
97 | |||
98 | flot2(); | ||
99 | var flot1 = function () { | ||
100 | var data = [[0, 65], [1, 59], [2, 80], [3, 81], [4, 56], [5, 55], [6, 40]]; | ||
101 | var data2 = [[0, 28], [1, 48], [2, 40], [3, 19], [4, 86], [5, 27], [6, 90]]; | ||
102 | var dataset = [ | ||
103 | { | ||
104 | data: data, | ||
105 | color: "rgba(220,220,220,1)", | ||
106 | lines: { | ||
107 | show: true, | ||
108 | fill: 0.2, | ||
109 | }, | ||
110 | shadowSize: 0, | ||
111 | }, { | ||
112 | data: data, | ||
113 | color: "#fff", | ||
114 | lines: { | ||
115 | show: false, | ||
116 | }, | ||
117 | points: { | ||
118 | show: true, | ||
119 | fill: true, | ||
120 | radius: 4, | ||
121 | fillColor: "rgba(220,220,220,1)", | ||
122 | lineWidth: 2 | ||
123 | }, | ||
124 | curvedLines: { | ||
125 | apply: false, | ||
126 | }, | ||
127 | shadowSize: 0 | ||
128 | }, { | ||
129 | data: data2, | ||
130 | color: "rgba(34,186,160,1)", | ||
131 | lines: { | ||
132 | show: true, | ||
133 | fill: 0.2, | ||
134 | }, | ||
135 | shadowSize: 0, | ||
136 | },{ | ||
137 | data: data2, | ||
138 | color: "#fff", | ||
139 | lines: { | ||
140 | show: false, | ||
141 | }, | ||
142 | curvedLines: { | ||
143 | apply: false, | ||
144 | }, | ||
145 | points: { | ||
146 | show: true, | ||
147 | fill: true, | ||
148 | radius: 4, | ||
149 | fillColor: "rgba(34,186,160,1)", | ||
150 | lineWidth: 2 | ||
151 | }, | ||
152 | shadowSize: 0 | ||
153 | } | ||
154 | ]; | ||
155 | |||
156 | var ticks = [[0, "1"], [1, "2"], [2, "3"], [3, "4"], [4, "5"], [5, "6"], [6, "7"], [7, "8"]]; | ||
157 | |||
158 | var plot1 = $.plot("#flotchart1", dataset, { | ||
159 | series: { | ||
160 | color: "#14D1BD", | ||
161 | lines: { | ||
162 | show: true, | ||
163 | fill: 0.2 | ||
164 | }, | ||
165 | shadowSize: 0, | ||
166 | curvedLines: { | ||
167 | apply: true, | ||
168 | active: true | ||
169 | } | ||
170 | }, | ||
171 | xaxis: { | ||
172 | ticks: ticks, | ||
173 | }, | ||
174 | legend: { | ||
175 | show: false | ||
176 | }, | ||
177 | grid: { | ||
178 | color: "#AFAFAF", | ||
179 | hoverable: true, | ||
180 | borderWidth: 0, | ||
181 | backgroundColor: '#FFF' | ||
182 | } | ||
183 | }); | ||
184 | |||
185 | }; | ||
186 | |||
187 | flot1(); | ||
188 | |||
189 | $(".live-tile").liveTile(); | ||
190 | |||
191 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $(document).ready(function() { | ||
2 | $('.summernote').summernote({ | ||
3 | height: 350 | ||
4 | }); | ||
5 | |||
6 | $('.date-picker').datepicker({ | ||
7 | orientation: "top auto", | ||
8 | autoclose: true | ||
9 | }); | ||
10 | |||
11 | $('#cp1').colorpicker({ | ||
12 | format: 'hex' | ||
13 | }); | ||
14 | $('#cp2').colorpicker(); | ||
15 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $( document ).ready(function() { | ||
2 | var $image = $(".image-crop > img"); | ||
3 | |||
4 | $image.cropper({ | ||
5 | aspectRatio: 7 / 5, | ||
6 | preview: ".img-preview" | ||
7 | }); | ||
8 | |||
9 | $("#zoomIn").click(function() { | ||
10 | $image.cropper('zoom', 0.1); | ||
11 | }); | ||
12 | |||
13 | $("#zoomOut").click(function() { | ||
14 | $image.cropper('zoom', -0.1); | ||
15 | }); | ||
16 | |||
17 | $("#rotateLeft").click(function() { | ||
18 | $image.cropper('rotate', 45); | ||
19 | }); | ||
20 | |||
21 | $("#rotateRight").click(function() { | ||
22 | $image.cropper('rotate', -45); | ||
23 | }); | ||
24 | |||
25 | $("#clear").click(function() { | ||
26 | $image.cropper('clear'); | ||
27 | }); | ||
28 | |||
29 | var $replaceWith = $('#replaceWith'); | ||
30 | $('#replace').click(function () { | ||
31 | $image.cropper('replace', $replaceWith.val()); | ||
32 | }); | ||
33 | |||
34 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $(document).ready(function() { | ||
2 | $("#zoom_01").elevateZoom(); | ||
3 | $("#zoom_02").elevateZoom({ zoomType : "inner", cursor: "crosshair" }); | ||
4 | $("#zoom_03").elevateZoom({ zoomType : "lens", lensShape : "round", lensSize : 200 }); | ||
5 | $("#zoom_04").elevateZoom({scrollZoom : true, zoomWindowPosition: 11}); | ||
6 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $(document).ready(function() { | ||
2 | $('select').select2(); | ||
3 | |||
4 | $(".js-example-basic-multiple-limit").select2({ | ||
5 | maximumSelectionLength: 2 | ||
6 | }); | ||
7 | |||
8 | $(".js-example-tokenizer").select2({ | ||
9 | tags: true, | ||
10 | tokenSeparators: [',', ' '] | ||
11 | }); | ||
12 | |||
13 | var data = [{ id: 0, text: 'enhancement' }, { id: 1, text: 'bug' }, { id: 2, text: 'duplicate' }, { id: 3, text: 'invalid' }, { id: 4, text: 'wontfix' }]; | ||
14 | |||
15 | $(".js-example-data-array").select2({ | ||
16 | data: data | ||
17 | }); | ||
18 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $(document).ready(function() { | ||
2 | var $validator = $("#wizardForm").validate({ | ||
3 | rules: { | ||
4 | exampleInputName: { | ||
5 | required: true | ||
6 | }, | ||
7 | exampleInputName2: { | ||
8 | required: true | ||
9 | }, | ||
10 | exampleInputEmail: { | ||
11 | required: true, | ||
12 | email: true | ||
13 | }, | ||
14 | exampleInputPassword1: { | ||
15 | required: true | ||
16 | }, | ||
17 | exampleInputPassword2: { | ||
18 | required: true, | ||
19 | equalTo: '#exampleInputPassword1' | ||
20 | }, | ||
21 | exampleInputProductName: { | ||
22 | required: true | ||
23 | }, | ||
24 | exampleInputProductId: { | ||
25 | required: true | ||
26 | }, | ||
27 | exampleInputQuantity: { | ||
28 | required: true | ||
29 | }, | ||
30 | exampleInputCard: { | ||
31 | required: true, | ||
32 | number: true | ||
33 | }, | ||
34 | exampleInputSecurity: { | ||
35 | required: true, | ||
36 | number: true | ||
37 | }, | ||
38 | exampleInputHolder: { | ||
39 | required: true | ||
40 | }, | ||
41 | exampleInputExpiration: { | ||
42 | required: true, | ||
43 | date: true | ||
44 | }, | ||
45 | exampleInputCsv: { | ||
46 | required: true, | ||
47 | number: true | ||
48 | } | ||
49 | } | ||
50 | }); | ||
51 | |||
52 | $('#rootwizard').bootstrapWizard({ | ||
53 | 'tabClass': 'nav nav-tabs', | ||
54 | onTabShow: function(tab, navigation, index) { | ||
55 | var $total = navigation.find('li').length; | ||
56 | var $current = index+1; | ||
57 | var $percent = ($current/$total) * 100; | ||
58 | $('#rootwizard').find('.progress-bar').css({width:$percent+'%'}); | ||
59 | }, | ||
60 | 'onNext': function(tab, navigation, index) { | ||
61 | var $valid = $("#wizardForm").valid(); | ||
62 | if(!$valid) { | ||
63 | $validator.focusInvalid(); | ||
64 | return false; | ||
65 | } | ||
66 | }, | ||
67 | 'onTabClick': function(tab, navigation, index) { | ||
68 | var $valid = $("#wizardForm").valid(); | ||
69 | if(!$valid) { | ||
70 | $validator.focusInvalid(); | ||
71 | return false; | ||
72 | } | ||
73 | }, | ||
74 | }); | ||
75 | |||
76 | $('.date-picker').datepicker({ | ||
77 | orientation: "top auto", | ||
78 | autoclose: true | ||
79 | }); | ||
80 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $( document ).ready(function() { | ||
2 | var hiddenMailOptions = function() { | ||
3 | if($('.checkbox-mail:checked').length) { | ||
4 | $('.mail-hidden-options').css('display', 'inline-block'); | ||
5 | } else { | ||
6 | $('.mail-hidden-options').css('display', 'none'); | ||
7 | }; | ||
8 | }; | ||
9 | |||
10 | hiddenMailOptions(); | ||
11 | |||
12 | $('.check-mail-all').click(function () { | ||
13 | $('.checkbox-mail').click(); | ||
14 | }); | ||
15 | |||
16 | $('.checkbox-mail').each(function() { | ||
17 | $(this).click(function() { | ||
18 | if($(this).closest('tr').hasClass("checked")){ | ||
19 | $(this).closest('tr').removeClass('checked'); | ||
20 | hiddenMailOptions(); | ||
21 | } else { | ||
22 | $(this).closest('tr').addClass('checked'); | ||
23 | hiddenMailOptions(); | ||
24 | } | ||
25 | }); | ||
26 | }); | ||
27 | |||
28 | $('.mailbox-content table tr td').not(":first-child").on('click', function(e) { | ||
29 | e.stopPropagation(); | ||
30 | e.preventDefault(); | ||
31 | |||
32 | window.location = "message-view.html"; | ||
33 | }); | ||
34 | }); |
1 | $( document ).ready(function() { | ||
2 | // Basic | ||
3 | $('#basicTree').jstree({ | ||
4 | 'core' : { | ||
5 | 'themes' : { | ||
6 | 'responsive': false | ||
7 | } | ||
8 | }, | ||
9 | 'types' : { | ||
10 | 'default' : { | ||
11 | 'icon' : 'fa fa-folder icon-state-info icon-md' | ||
12 | }, | ||
13 | 'file' : { | ||
14 | 'icon' : 'fa fa-file icon-state-default icon-md' | ||
15 | } | ||
16 | }, | ||
17 | 'plugins' : ['types'] | ||
18 | }); | ||
19 | |||
20 | // Checkbox | ||
21 | $('#checkTree').jstree({ | ||
22 | 'core' : { | ||
23 | 'themes' : { | ||
24 | 'responsive': false | ||
25 | } | ||
26 | }, | ||
27 | 'types' : { | ||
28 | 'default' : { | ||
29 | 'icon' : 'fa fa-folder icon-state-info icon-md' | ||
30 | }, | ||
31 | 'file' : { | ||
32 | 'icon' : 'fa fa-file icon-state-default icon-md' | ||
33 | } | ||
34 | }, | ||
35 | 'plugins' : ['types', 'checkbox'] | ||
36 | }); | ||
37 | |||
38 | // Drag & Drop | ||
39 | $('#dragTree').jstree({ | ||
40 | 'core' : { | ||
41 | 'check_callback' : true, | ||
42 | 'themes' : { | ||
43 | 'responsive': false | ||
44 | } | ||
45 | }, | ||
46 | 'types' : { | ||
47 | 'default' : { | ||
48 | 'icon' : 'fa fa-folder icon-state-info icon-md' | ||
49 | }, | ||
50 | 'file' : { | ||
51 | 'icon' : 'fa fa-file icon-state-default icon-md' | ||
52 | } | ||
53 | }, | ||
54 | 'plugins' : ['types', 'dnd'] | ||
55 | }); | ||
56 | |||
57 | // Ajax | ||
58 | $('#ajaxTree').jstree({ | ||
59 | 'core' : { | ||
60 | 'check_callback' : true, | ||
61 | 'themes' : { | ||
62 | 'responsive': false | ||
63 | }, | ||
64 | 'data' : { | ||
65 | 'url' : function (node) { | ||
66 | return node.id === '#' ? 'assets/js/pages/ajax_roots.json' : 'assets/js/pages/ajax_children.json'; | ||
67 | }, | ||
68 | 'data' : function (node) { | ||
69 | return { 'id' : node.id }; | ||
70 | } | ||
71 | } | ||
72 | }, | ||
73 | "types" : { | ||
74 | 'default' : { | ||
75 | 'icon' : 'fa fa-folder icon-state-info icon-md' | ||
76 | }, | ||
77 | 'file' : { | ||
78 | 'icon' : 'fa fa-file icon-state-default icon-md' | ||
79 | } | ||
80 | }, | ||
81 | "plugins" : [ "contextmenu", "dnd", "search", "state", "types", "wholerow" ] | ||
82 | }); | ||
83 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $( document ).ready(function() { | ||
2 | function initialize() { | ||
3 | var mapOptions = { | ||
4 | center: new google.maps.LatLng(27.284836,-81.075513), | ||
5 | zoom: 9 | ||
6 | }; | ||
7 | var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); | ||
8 | } | ||
9 | google.maps.event.addDomListener(window, 'load', initialize); | ||
10 | |||
11 | }); |
1 | $( document ).ready(function() { | ||
2 | jQuery('#vmap').vectorMap({ | ||
3 | map: 'world_en', | ||
4 | backgroundColor: '#fff', | ||
5 | borderColor: '#fff', | ||
6 | borderOpacity: 0.25, | ||
7 | borderWidth: 1, | ||
8 | color: '#e7e7e7', | ||
9 | enableZoom: true, | ||
10 | hoverColor: '#c9dfaf', | ||
11 | hoverOpacity: null, | ||
12 | normalizeFunction: 'linear', | ||
13 | scaleColors: ['#b6d6ff', '#005ace'], | ||
14 | selectedColor: '#c9dfaf', | ||
15 | selectedRegion: null, | ||
16 | showTooltip: true, | ||
17 | onRegionClick: function(element, code, region) { | ||
18 | var message = 'You clicked "' | ||
19 | + region | ||
20 | + '" which has the code: ' | ||
21 | + code.toUpperCase(); | ||
22 | |||
23 | alert(message); | ||
24 | }, | ||
25 | markers: [ | ||
26 | {latLng: [41.90, 12.45], name: 'Vatican City'}, | ||
27 | {latLng: [43.73, 7.41], name: 'Monaco'}, | ||
28 | {latLng: [-0.52, 166.93], name: 'Nauru'}, | ||
29 | {latLng: [-8.51, 179.21], name: 'Tuvalu'} | ||
30 | ] | ||
31 | |||
32 | }); | ||
33 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $( document ).ready(function() { | ||
2 | // Nestable | ||
3 | var updateOutput = function(e) { | ||
4 | var list = e.length ? e : $(e.target), | ||
5 | output = list.data('output'); | ||
6 | if (window.JSON) { | ||
7 | output.val(window.JSON.stringify(list.nestable('serialize')));//, null, 2)); | ||
8 | } else { | ||
9 | output.val('JSON browser support required for this demo.'); | ||
10 | } | ||
11 | }; | ||
12 | |||
13 | $('#nestable').nestable({group: 1}).on('change', updateOutput); | ||
14 | |||
15 | $('#nestable2').nestable({group: 1}).on('change', updateOutput); | ||
16 | |||
17 | updateOutput($('#nestable').data('output', $('#nestable-output'))); | ||
18 | updateOutput($('#nestable2').data('output', $('#nestable2-output'))); | ||
19 | |||
20 | $('#nestable-menu').on('click', function(e) { | ||
21 | var target = $(e.target), | ||
22 | action = target.data('action'); | ||
23 | if (action === 'expand-all') { | ||
24 | $('.dd').nestable('expandAll'); | ||
25 | } | ||
26 | if (action === 'collapse-all') { | ||
27 | $('.dd').nestable('collapseAll'); | ||
28 | } | ||
29 | }); | ||
30 | |||
31 | $('#nestable3').nestable(); | ||
32 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $( document ).ready(function() { | ||
2 | var i = -1; | ||
3 | var toastCount = 0; | ||
4 | var $toastlast; | ||
5 | |||
6 | var getMessage = function () { | ||
7 | var msgs = ['My name is Inigo Montoya. You killed my father. Prepare to die!', | ||
8 | '<div><input class="input-small" value="textbox"/> <a href="http://johnpapa.net" target="_blank">This is a hyperlink</a></div><div><button type="button" id="okBtn" class="btn btn-primary">Close me</button><button type="button" id="surpriseBtn" class="btn" style="margin: 0 8px 0 8px">Surprise me</button></div>', | ||
9 | 'Are you the six fingered man?', | ||
10 | 'Inconceivable!', | ||
11 | 'I do not think that means what you think it means.', | ||
12 | 'Have fun storming the castle!' | ||
13 | ]; | ||
14 | i++; | ||
15 | if (i === msgs.length) { | ||
16 | i = 0; | ||
17 | } | ||
18 | |||
19 | return msgs[i]; | ||
20 | }; | ||
21 | |||
22 | var getMessageWithClearButton = function (msg) { | ||
23 | msg = msg ? msg : 'Clear itself?'; | ||
24 | msg += '<br /><br /><button type="button" class="btn clear">Yes</button>'; | ||
25 | return msg; | ||
26 | }; | ||
27 | |||
28 | $('#showtoast').click(function () { | ||
29 | var shortCutFunction = $("#toastTypeGroup input:radio:checked").val(); | ||
30 | var msg = $('#message').val(); | ||
31 | var title = $('#title').val() || ''; | ||
32 | var $showDuration = $('#showDuration'); | ||
33 | var $hideDuration = $('#hideDuration'); | ||
34 | var $timeOut = $('#timeOut'); | ||
35 | var $extendedTimeOut = $('#extendedTimeOut'); | ||
36 | var $showEasing = $('#showEasing'); | ||
37 | var $hideEasing = $('#hideEasing'); | ||
38 | var $showMethod = $('#showMethod'); | ||
39 | var $hideMethod = $('#hideMethod'); | ||
40 | var toastIndex = toastCount++; | ||
41 | var addClear = $('#addClear').prop('checked'); | ||
42 | |||
43 | toastr.options = { | ||
44 | closeButton: $('#closeButton').prop('checked'), | ||
45 | debug: $('#debugInfo').prop('checked'), | ||
46 | newestOnTop: $('#newestOnTop').prop('checked'), | ||
47 | progressBar: $('#progressBar').prop('checked'), | ||
48 | positionClass: $('#positionGroup input:radio:checked').val() || 'toast-top-right', | ||
49 | preventDuplicates: $('#preventDuplicates').prop('checked'), | ||
50 | onclick: null | ||
51 | }; | ||
52 | |||
53 | if ($('#addBehaviorOnToastClick').prop('checked')) { | ||
54 | toastr.options.onclick = function () { | ||
55 | alert('You can perform some custom action after a toast goes away'); | ||
56 | }; | ||
57 | } | ||
58 | |||
59 | if ($showDuration.val().length) { | ||
60 | toastr.options.showDuration = $showDuration.val(); | ||
61 | } | ||
62 | |||
63 | if ($hideDuration.val().length) { | ||
64 | toastr.options.hideDuration = $hideDuration.val(); | ||
65 | } | ||
66 | |||
67 | if ($timeOut.val().length) { | ||
68 | toastr.options.timeOut = addClear ? 0 : $timeOut.val(); | ||
69 | } | ||
70 | |||
71 | if ($extendedTimeOut.val().length) { | ||
72 | toastr.options.extendedTimeOut = addClear ? 0 : $extendedTimeOut.val(); | ||
73 | } | ||
74 | |||
75 | if ($showEasing.val().length) { | ||
76 | toastr.options.showEasing = $showEasing.val(); | ||
77 | } | ||
78 | |||
79 | if ($hideEasing.val().length) { | ||
80 | toastr.options.hideEasing = $hideEasing.val(); | ||
81 | } | ||
82 | |||
83 | if ($showMethod.val().length) { | ||
84 | toastr.options.showMethod = $showMethod.val(); | ||
85 | } | ||
86 | |||
87 | if ($hideMethod.val().length) { | ||
88 | toastr.options.hideMethod = $hideMethod.val(); | ||
89 | } | ||
90 | |||
91 | if (addClear) { | ||
92 | msg = getMessageWithClearButton(msg); | ||
93 | toastr.options.tapToDismiss = false; | ||
94 | } | ||
95 | if (!msg) { | ||
96 | msg = getMessage(); | ||
97 | } | ||
98 | |||
99 | $('#toastrOptions').text('Command: toastr["' | ||
100 | + shortCutFunction | ||
101 | + '"]("' | ||
102 | + msg | ||
103 | + (title ? '", "' + title : '') | ||
104 | + '")\n\ntoastr.options = ' | ||
105 | + JSON.stringify(toastr.options, null, 2) | ||
106 | ); | ||
107 | |||
108 | var $toast = toastr[shortCutFunction](msg, title); // Wire up an event handler to a button in the toast, if it exists | ||
109 | $toastlast = $toast; | ||
110 | |||
111 | if(typeof $toast === 'undefined'){ | ||
112 | return; | ||
113 | } | ||
114 | |||
115 | if ($toast.find('#okBtn').length) { | ||
116 | $toast.delegate('#okBtn', 'click', function () { | ||
117 | alert('you clicked me. i was toast #' + toastIndex + '. goodbye!'); | ||
118 | $toast.remove(); | ||
119 | }); | ||
120 | } | ||
121 | if ($toast.find('#surpriseBtn').length) { | ||
122 | $toast.delegate('#surpriseBtn', 'click', function () { | ||
123 | alert('Surprise! you clicked me. i was toast #' + toastIndex + '. You could perform an action here.'); | ||
124 | }); | ||
125 | } | ||
126 | if ($toast.find('.clear').length) { | ||
127 | $toast.delegate('.clear', 'click', function () { | ||
128 | toastr.clear($toast, { force: true }); | ||
129 | }); | ||
130 | } | ||
131 | }); | ||
132 | |||
133 | function getLastToast(){ | ||
134 | return $toastlast; | ||
135 | } | ||
136 | $('#clearlasttoast').click(function () { | ||
137 | toastr.clear(getLastToast()); | ||
138 | }); | ||
139 | $('#cleartoasts').click(function () { | ||
140 | toastr.clear(); | ||
141 | }); | ||
142 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $( document ).ready(function() { | ||
2 | function initialize() { | ||
3 | var mapOptions = { | ||
4 | center: new google.maps.LatLng(40.7033127,-73.979681,10), | ||
5 | zoom: 9 | ||
6 | }; | ||
7 | var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); | ||
8 | } | ||
9 | google.maps.event.addDomListener(window, 'load', initialize); | ||
10 | |||
11 | }); |
1 | $( document ).ready(function() { | ||
2 | setTimeout(function() { | ||
3 | toastr.options = { | ||
4 | closeButton: true, | ||
5 | progressBar: true, | ||
6 | positionClass: 'toast-bottom-right', | ||
7 | showMethod: 'fadeIn', | ||
8 | hideMethod: 'fadeOut', | ||
9 | timeOut: 5000 | ||
10 | }; | ||
11 | toastr.info('You have 5 items in cart. Checkout on top!'); | ||
12 | }, 1800); | ||
13 | [].slice.call( document.querySelectorAll( '.checkout' ) ).forEach( function( el ) { | ||
14 | var openCtrl = el.querySelector( '.checkout__button' ), | ||
15 | closeCtrls = el.querySelectorAll( '.checkout__cancel' ); | ||
16 | |||
17 | openCtrl.addEventListener( 'click', function(ev) { | ||
18 | ev.preventDefault(); | ||
19 | classie.add( el, 'checkout--active' ); | ||
20 | } ); | ||
21 | |||
22 | [].slice.call( closeCtrls ).forEach( function( ctrl ) { | ||
23 | ctrl.addEventListener( 'click', function() { | ||
24 | classie.remove( el, 'checkout--active' ); | ||
25 | } ); | ||
26 | } ); | ||
27 | } ); | ||
28 | $('select').select2(); | ||
29 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $(document).ready(function() { | ||
2 | |||
3 | //ajax mocks | ||
4 | $.mockjaxSettings.responseTime = 500; | ||
5 | |||
6 | $.mockjax({ | ||
7 | url: '/post', | ||
8 | response: function(settings) { | ||
9 | log(settings, this); | ||
10 | } | ||
11 | }); | ||
12 | |||
13 | $.mockjax({ | ||
14 | url: '/error', | ||
15 | status: 400, | ||
16 | statusText: 'Bad Request', | ||
17 | response: function(settings) { | ||
18 | this.responseText = 'Please input correct value'; | ||
19 | log(settings, this); | ||
20 | } | ||
21 | }); | ||
22 | |||
23 | $.mockjax({ | ||
24 | url: '/status', | ||
25 | status: 500, | ||
26 | response: function(settings) { | ||
27 | this.responseText = 'Internal Server Error'; | ||
28 | log(settings, this); | ||
29 | } | ||
30 | }); | ||
31 | |||
32 | $.mockjax({ | ||
33 | url: '/groups', | ||
34 | response: function(settings) { | ||
35 | this.responseText = [ | ||
36 | {value: 0, text: 'Guest'}, | ||
37 | {value: 1, text: 'Service'}, | ||
38 | {value: 2, text: 'Customer'}, | ||
39 | {value: 3, text: 'Operator'}, | ||
40 | {value: 4, text: 'Support'}, | ||
41 | {value: 5, text: 'Admin'} | ||
42 | ]; | ||
43 | log(settings, this); | ||
44 | } | ||
45 | }); | ||
46 | |||
47 | function log(settings, response) { | ||
48 | var s = [], str; | ||
49 | s.push(settings.type.toUpperCase() + ' url = "' + settings.url + '"'); | ||
50 | for(var a in settings.data) { | ||
51 | if(settings.data[a] && typeof settings.data[a] === 'object') { | ||
52 | str = []; | ||
53 | for(var j in settings.data[a]) {str.push(j+': "'+settings.data[a][j]+'"');} | ||
54 | str = '{ '+str.join(', ')+' }'; | ||
55 | } else { | ||
56 | str = '"'+settings.data[a]+'"'; | ||
57 | } | ||
58 | s.push(a + ' = ' + str); | ||
59 | } | ||
60 | s.push('RESPONSE: status = ' + response.status); | ||
61 | |||
62 | if(response.responseText) { | ||
63 | if($.isArray(response.responseText)) { | ||
64 | s.push('['); | ||
65 | $.each(response.responseText, function(i, v){ | ||
66 | s.push('{value: ' + v.value+', text: "'+v.text+'"}'); | ||
67 | }); | ||
68 | s.push(']'); | ||
69 | } else { | ||
70 | s.push($.trim(response.responseText)); | ||
71 | } | ||
72 | } | ||
73 | s.push('--------------------------------------\n'); | ||
74 | $('#console').val(s.join('\n') + $('#console').val()); | ||
75 | } | ||
76 | |||
77 | //turn to inline mode | ||
78 | $.fn.editable.defaults.mode = 'inline'; | ||
79 | |||
80 | //editables | ||
81 | $('#example-editable td a').editable({ | ||
82 | url: '/post', | ||
83 | type: 'text', | ||
84 | pk: 1, | ||
85 | name: 'username', | ||
86 | title: 'Enter username' | ||
87 | }); | ||
88 | |||
89 | // Datatables | ||
90 | $('#example').DataTable(); | ||
91 | $('#example-editable').DataTable(); | ||
92 | |||
93 | var table = $('#example2').DataTable({ | ||
94 | "columnDefs": [ | ||
95 | { "visible": false, "targets": 2 } | ||
96 | ], | ||
97 | "order": [[ 2, 'asc' ]], | ||
98 | "displayLength": 25, | ||
99 | "drawCallback": function ( settings ) { | ||
100 | var api = this.api(); | ||
101 | var rows = api.rows( {page:'current'} ).nodes(); | ||
102 | var last=null; | ||
103 | |||
104 | api.column(2, {page:'current'} ).data().each( function ( group, i ) { | ||
105 | if ( last !== group ) { | ||
106 | $(rows).eq( i ).before( | ||
107 | '<tr class="group"><td colspan="5">'+group+'</td></tr>' | ||
108 | ); | ||
109 | |||
110 | last = group; | ||
111 | } | ||
112 | } ); | ||
113 | } | ||
114 | } ); | ||
115 | |||
116 | // Order by the grouping | ||
117 | $('#example2 tbody').on( 'click', 'tr.group', function () { | ||
118 | var currentOrder = table.order()[0]; | ||
119 | if ( currentOrder[0] === 2 && currentOrder[1] === 'asc' ) { | ||
120 | table.order( [ 2, 'desc' ] ).draw(); | ||
121 | } | ||
122 | else { | ||
123 | table.order( [ 2, 'asc' ] ).draw(); | ||
124 | } | ||
125 | } ); | ||
126 | |||
127 | $.fn.isValid = function(){ | ||
128 | return this[0].checkValidity() | ||
129 | } | ||
130 | |||
131 | var t = $('#example3').DataTable(); | ||
132 | |||
133 | $('#add-row').on( 'click', function () { | ||
134 | if($("#add-row-form").isValid()) { | ||
135 | var name = $('#name-input').val(), | ||
136 | position = $('#position-input').val(), | ||
137 | age = $('#age-input').val(), | ||
138 | date = $('#date-input').val(), | ||
139 | salary = $('#salary-input').val(); | ||
140 | t.row.add( [ | ||
141 | name, | ||
142 | position, | ||
143 | age, | ||
144 | date, | ||
145 | '$' + salary | ||
146 | ] ).draw(); | ||
147 | |||
148 | $('.modal').modal('hide'); | ||
149 | |||
150 | return false; | ||
151 | } | ||
152 | }); | ||
153 | |||
154 | $('.date-picker').datepicker({ | ||
155 | orientation: "top auto", | ||
156 | autoclose: true | ||
157 | }); | ||
158 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | $( document ).ready(function() { | ||
2 | function initialize() { | ||
3 | var mapOptions = { | ||
4 | center: new google.maps.LatLng(27.284836,-81.075513), | ||
5 | zoom: 9 | ||
6 | }; | ||
7 | var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); | ||
8 | } | ||
9 | google.maps.event.addDomListener(window, 'load', initialize); | ||
10 | |||
11 | }); |
1 | $( document ).ready(function() { | ||
2 | var todo = function() { | ||
3 | $('.todo-list .todo-item input').click(function() { | ||
4 | if($(this).is(':checked')) { | ||
5 | $(this).parent().parent().parent().toggleClass('complete'); | ||
6 | } else { | ||
7 | $(this).parent().parent().parent().toggleClass('complete'); | ||
8 | } | ||
9 | }); | ||
10 | |||
11 | $('.todo-nav .all-task').click(function() { | ||
12 | $('.todo-list').removeClass('only-active'); | ||
13 | $('.todo-list').removeClass('only-complete'); | ||
14 | $('.todo-nav li.active').removeClass('active'); | ||
15 | $(this).addClass('active'); | ||
16 | }); | ||
17 | |||
18 | $('.todo-nav .active-task').click(function() { | ||
19 | $('.todo-list').removeClass('only-complete'); | ||
20 | $('.todo-list').addClass('only-active'); | ||
21 | $('.todo-nav li.active').removeClass('active'); | ||
22 | $(this).addClass('active'); | ||
23 | }); | ||
24 | |||
25 | $('.todo-nav .completed-task').click(function() { | ||
26 | $('.todo-list').removeClass('only-active'); | ||
27 | $('.todo-list').addClass('only-complete'); | ||
28 | $('.todo-nav li.active').removeClass('active'); | ||
29 | $(this).addClass('active'); | ||
30 | }); | ||
31 | |||
32 | $('#uniform-all-complete input').click(function() { | ||
33 | if($(this).is(':checked')) { | ||
34 | $('.todo-item .checker span:not(.checked) input').click(); | ||
35 | } else { | ||
36 | $('.todo-item .checker span.checked input').click(); | ||
37 | } | ||
38 | }); | ||
39 | |||
40 | $('.remove-todo-item').click(function() { | ||
41 | $(this).parent().remove(); | ||
42 | }); | ||
43 | }; | ||
44 | |||
45 | todo(); | ||
46 | |||
47 | $(".add-task").keypress(function (e) { | ||
48 | // if ((e.which == 13)&&(!$(this).val().length == 0)) { | ||
49 | // $('<div class="todo-item added"><input type="checkbox"><span class="todo-description">' + $(this).val() + '</span><a href="javascript:void(0);" class="pull-right remove-todo-item"><i class="fa fa-times"></i></a></div>').insertAfter('.todo-list .todo-item:last-child'); | ||
50 | // $(this).val(''); | ||
51 | // } else if(e.which == 13) { | ||
52 | // alert('Please enter new task'); | ||
53 | // } | ||
54 | $('.todo-list .todo-item.added input').uniform(); | ||
55 | $('.todo-list .todo-item.added input').click(function() { | ||
56 | if($(this).is(':checked')) { | ||
57 | $(this).parent().parent().parent().toggleClass('complete'); | ||
58 | } else { | ||
59 | $(this).parent().parent().parent().toggleClass('complete'); | ||
60 | } | ||
61 | }); | ||
62 | $('.todo-list .todo-item.added .remove-todo-item').click(function() { | ||
63 | $(this).parent().remove(); | ||
64 | }); | ||
65 | }); | ||
66 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
3.19 KB
2.9 KB
8.61 KB
160 Bytes
148 Bytes
201 Bytes
158 Bytes
146 Bytes
351 Bytes
261 Bytes
389 Bytes
375 Bytes
385 Bytes
371 Bytes
288 Bytes
426 Bytes
348 Bytes
4.49 KB
4.49 KB
4.49 KB
4.49 KB
6.32 KB
4.09 KB
5.3 KB
4.63 KB
4.78 KB
3.63 KB
4.64 KB
2.26 KB
2.24 KB
2 KB
1.91 KB
1.65 KB
4.1 KB
304 Bytes
505 Bytes
694 Bytes
358 Bytes
457 Bytes
351 Bytes
244 Bytes
301 Bytes
387 Bytes
246 Bytes
5.72 KB
317 Bytes
367 Bytes
6.84 KB
4.49 KB
4.49 KB
4.49 KB
6.32 KB
1.53 KB
5.58 KB
1.68 KB
4.15 KB
1.84 KB
1.68 KB
807 Bytes
105 KB
106 KB
62.1 KB
39.8 KB
52.6 KB
60.8 KB
67.1 KB
55 KB
32.5 KB
39.6 KB
42.2 KB
143 Bytes
143 Bytes
32.1 KB
509 Bytes
1.81 KB
3.8 KB
3.35 KB
-
Please register or sign in to post a comment