custom.js 161 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488
  1. /**
  2. * Resize function without multiple trigger
  3. *
  4. * Usage:
  5. * $(window).smartresize(function(){
  6. * // code here
  7. * });
  8. */
  9. (function($,sr){
  10. // debouncing function from John Hann
  11. // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
  12. var debounce = function (func, threshold, execAsap) {
  13. var timeout;
  14. return function debounced () {
  15. var obj = this, args = arguments;
  16. function delayed () {
  17. if (!execAsap)
  18. func.apply(obj, args);
  19. timeout = null;
  20. }
  21. if (timeout)
  22. clearTimeout(timeout);
  23. else if (execAsap)
  24. func.apply(obj, args);
  25. timeout = setTimeout(delayed, threshold || 100);
  26. };
  27. };
  28. // smartresize
  29. jQuery.fn[sr] = function(fn){ return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };
  30. })(jQuery,'smartresize');
  31. /**
  32. * Resize function without multiple trigger
  33. *
  34. * Usage:
  35. * $(window).smartresize(function(){
  36. * // code here
  37. * });
  38. */
  39. (function($,sr){
  40. // debouncing function from John Hann
  41. // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
  42. var debounce = function (func, threshold, execAsap) {
  43. var timeout;
  44. return function debounced () {
  45. var obj = this, args = arguments;
  46. function delayed () {
  47. if (!execAsap)
  48. func.apply(obj, args);
  49. timeout = null;
  50. }
  51. if (timeout)
  52. clearTimeout(timeout);
  53. else if (execAsap)
  54. func.apply(obj, args);
  55. timeout = setTimeout(delayed, threshold || 100);
  56. };
  57. };
  58. // smartresize
  59. jQuery.fn[sr] = function(fn){ return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };
  60. })(jQuery,'smartresize');
  61. /**
  62. * Resize function without multiple trigger
  63. *
  64. * Usage:
  65. * $(window).smartresize(function(){
  66. * // code here
  67. * });
  68. */
  69. (function($,sr){
  70. // debouncing function from John Hann
  71. // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
  72. var debounce = function (func, threshold, execAsap) {
  73. var timeout;
  74. return function debounced () {
  75. var obj = this, args = arguments;
  76. function delayed () {
  77. if (!execAsap)
  78. func.apply(obj, args);
  79. timeout = null;
  80. }
  81. if (timeout)
  82. clearTimeout(timeout);
  83. else if (execAsap)
  84. func.apply(obj, args);
  85. timeout = setTimeout(delayed, threshold || 100);
  86. };
  87. };
  88. // smartresize
  89. jQuery.fn[sr] = function(fn){ return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };
  90. })(jQuery,'smartresize');
  91. /**
  92. * Resize function without multiple trigger
  93. *
  94. * Usage:
  95. * $(window).smartresize(function(){
  96. * // code here
  97. * });
  98. */
  99. (function ($, sr) {
  100. // debouncing function from John Hann
  101. // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
  102. var debounce = function (func, threshold, execAsap) {
  103. var timeout;
  104. return function debounced() {
  105. var obj = this, args = arguments;
  106. function delayed() {
  107. if (!execAsap)
  108. func.apply(obj, args);
  109. timeout = null;
  110. }
  111. if (timeout)
  112. clearTimeout(timeout);
  113. else if (execAsap)
  114. func.apply(obj, args);
  115. timeout = setTimeout(delayed, threshold || 100);
  116. };
  117. };
  118. // smartresize
  119. jQuery.fn[sr] = function (fn) {
  120. return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr);
  121. };
  122. })(jQuery, 'smartresize');
  123. /**
  124. * To change this license header, choose License Headers in Project Properties.
  125. * To change this template file, choose Tools | Templates
  126. * and open the template in the editor.
  127. */
  128. /* SIDEBAR */
  129. // fix for dynamic tables
  130. function setContentHeight() {
  131. var CURRENT_URL = window.location.href.split("#")[0].split("?")[0],
  132. $BODY = $("body"),
  133. $MENU_TOGGLE = $("#menu_toggle"),
  134. $SIDEBAR_MENU = $("#sidebar-menu"),
  135. $SIDEBAR_FOOTER = $(".sidebar-footer"),
  136. $LEFT_COL = $(".left_col"),
  137. $RIGHT_COL = $(".right_col"),
  138. $NAV_MENU = $(".nav_menu"),
  139. $FOOTER = $("footer");
  140. // reset height
  141. $RIGHT_COL.css('min-height', $(window).height());
  142. var bodyHeight = $BODY.outerHeight(),
  143. footerHeight = $BODY.hasClass('footer_fixed') ? -10 : $FOOTER.height(),
  144. leftColHeight = $LEFT_COL.eq(1).height() + $SIDEBAR_FOOTER.height(),
  145. contentHeight = bodyHeight < leftColHeight ? leftColHeight : bodyHeight;
  146. // normalize content
  147. contentHeight -= $NAV_MENU.height() + footerHeight;
  148. $RIGHT_COL.css('min-height', contentHeight);
  149. };
  150. $(document).ready(function () {
  151. $SIDEBAR_MENU.find('a').on('click', function (ev) {
  152. var $li = $(this).parent();
  153. var child_menu = $('ul:first', $li);
  154. var other_list_items = $li.parent().find('li').not($li);
  155. var other_level_menus = $li.parents('.child_menu').find('ul.child_menu').not(child_menu);
  156. if ($li.is('.active')) {
  157. $li.removeClass('active active-sm');
  158. $('ul:first', $li).slideUp(function () {
  159. setContentHeight();
  160. if ($('.left_col.menu_fixed > .mCustomScrollBox > .mCSB_container ').length) {
  161. $('.left_col.menu_fixed > .mCustomScrollBox > .mCSB_container ').css('min-height', '0');
  162. }
  163. });
  164. } else {
  165. // prevent closing menu if we are on child menu
  166. if (!$li.parent().is('.child_menu')) {
  167. $SIDEBAR_MENU.find('li').removeClass('active active-sm');
  168. $SIDEBAR_MENU.find('li ul').slideUp();
  169. } else {
  170. if ($BODY.is(".nav-sm")) {
  171. if (!$li.parent().is('.child_menu')) {
  172. $SIDEBAR_MENU.find('li').removeClass('active active-sm');
  173. $SIDEBAR_MENU.find('li ul').slideUp();
  174. }
  175. }
  176. }
  177. $li.addClass('active');
  178. child_menu.slideDown(function () {
  179. setContentHeight();
  180. // fix for fixed sidebar menu
  181. if ($('.left_col.menu_fixed > .mCustomScrollBox > .mCSB_container ').length) {
  182. $('.left_col.menu_fixed > .mCustomScrollBox > .mCSB_container ').css('min-height', $(this).outerHeight() + $('.left_col.menu_fixed .left_col').outerHeight());
  183. }
  184. // fix for fixed footer
  185. if ($('body.footer_fixed').length) {
  186. $('.right_col_wrapper .right_col').css('min-height', $(this).outerHeight() + $('.right_col_wrapper .right_col').outerHeight());
  187. }
  188. });
  189. if (other_list_items.length) {
  190. other_list_items.removeClass('active');
  191. }
  192. if (other_level_menus.length) {
  193. other_level_menus.slideUp();
  194. }
  195. }
  196. });
  197. // toggle small or large menu
  198. $MENU_TOGGLE.on('click', function () {
  199. if ($BODY.hasClass('nav-md')) {
  200. $SIDEBAR_MENU.find('li.active ul').hide();
  201. $SIDEBAR_MENU.find('li.active').addClass('active-sm').removeClass('active');
  202. $('.main_container > .row > .left_col').removeClass('col-md-2 col-lg-2').addClass('col-md-1 col-lg-1 col-2');
  203. if ($('.main_container > .row > .left_col.menu_fixed').length) {
  204. if ($(window).width() < 992) {
  205. $('.main_container > .row > .right_col_wrapper').addClass('offset-2 offset-md-1');
  206. } else {
  207. $('.main_container > .row > .right_col_wrapper').removeClass('offset-md-2 offset-lg-2').addClass('offset-md-1');
  208. }
  209. }
  210. $('.main_container > .row > .right_col_wrapper').removeClass('col-lg-10 col-md-12').addClass('col-lg-11 col-md-11 col-10');
  211. } else {
  212. $SIDEBAR_MENU.find('li.active-sm ul').show();
  213. $SIDEBAR_MENU.find('li.active-sm').addClass('active').removeClass('active-sm');
  214. $('.main_container > .row > .left_col').removeClass('col-lg-1 col-2 col-md-1').addClass('col-lg-2 col-md-2');
  215. if ($('.main_container > .row > .left_col.menu_fixed').length) {
  216. if ($(window).width() < 992) {
  217. $('.main_container > .row > .right_col_wrapper').removeClass('offset-2 offset-md-1');
  218. } else {
  219. $('.main_container > .row > .right_col_wrapper').removeClass('offset-1').addClass('offset-md-2');
  220. }
  221. }
  222. $('.main_container > .row > .right_col_wrapper').removeClass('col-lg-11 col-10 col-md-11').addClass('col-lg-10 col-md-12');
  223. }
  224. $BODY.toggleClass('nav-md nav-sm');
  225. $('.dataTable').each(function () {
  226. $(this).dataTable().fnDraw();
  227. });
  228. setContentHeight();
  229. });
  230. // check active menu
  231. var $cur_menu = $SIDEBAR_MENU.find('a').filter(function () { // find nav element with exact match
  232. return this.href == CURRENT_URL;
  233. });
  234. if ($cur_menu.length == 0) { // if no exact match, try to find best match
  235. var $cur_menu = $SIDEBAR_MENU.find('a').filter(function () {
  236. return CURRENT_URL.startsWith(this.href) && this.href != '';
  237. });
  238. if ($cur_menu.length > 1) { // get ONLY one with longest href as best match
  239. var l = 0;
  240. for (var i = 0; i < $cur_menu.length; i++) {
  241. if ($cur_menu.eq(l).attr('href').length < $cur_menu.eq(i).attr('href').length) l = i;
  242. }
  243. $cur_menu = $cur_menu.eq(l);
  244. }
  245. }
  246. // original code below, but executed for $cur_menu
  247. $cur_menu.parent('li').addClass('current-page').parents('ul').slideDown(function () {
  248. setContentHeight();
  249. }).parent().addClass('active');
  250. // recompute content when resizing
  251. $(window).smartresize(function () {
  252. setContentHeight();
  253. });
  254. setContentHeight();
  255. // fixed sidebar
  256. if ($.fn.mCustomScrollbar) {
  257. $('.menu_fixed').mCustomScrollbar({
  258. autoHideScrollbar: true,
  259. theme: 'minimal',
  260. scrollInertia: 600,
  261. mouseWheel: {
  262. preventDefault: true,
  263. scrollAmount: 100
  264. }
  265. });
  266. }
  267. });
  268. /* SIDEBAR - end */
  269. function countChecked() {
  270. "all" === checkState && $(".bulk_action input[name='table_records']").iCheck("check"), "none" === checkState && $(".bulk_action input[name='table_records']").iCheck("uncheck");
  271. var a = $(".bulk_action input[name='table_records']:checked").length;
  272. a ? ($(".column-title").hide(), $(".bulk-actions").show(), $(".action-cnt").html(a + " Records Selected")) : ($(".column-title").show(), $(".bulk-actions").hide())
  273. }
  274. function gd(a, b, c) {
  275. return new Date(a, b - 1, c).getTime()
  276. }
  277. function init_flot_chart() {
  278. if ("undefined" != typeof $.plot) {
  279. console.log("init_flot_chart");
  280. for (var a = [
  281. [gd(2012, 1, 1), 17],
  282. [gd(2012, 1, 2), 74],
  283. [gd(2012, 1, 3), 6],
  284. [gd(2012, 1, 4), 39],
  285. [gd(2012, 1, 5), 20],
  286. [gd(2012, 1, 6), 85],
  287. [gd(2012, 1, 7), 7]
  288. ], b = [
  289. [gd(2012, 1, 1), 82],
  290. [gd(2012, 1, 2), 23],
  291. [gd(2012, 1, 3), 66],
  292. [gd(2012, 1, 4), 9],
  293. [gd(2012, 1, 5), 119],
  294. [gd(2012, 1, 6), 6],
  295. [gd(2012, 1, 7), 9]
  296. ], d = [], e = [
  297. [0, 1],
  298. [1, 9],
  299. [2, 6],
  300. [3, 10],
  301. [4, 5],
  302. [5, 17],
  303. [6, 6],
  304. [7, 10],
  305. [8, 7],
  306. [9, 11],
  307. [10, 35],
  308. [11, 9],
  309. [12, 12],
  310. [13, 5],
  311. [14, 3],
  312. [15, 4],
  313. [16, 9]
  314. ], f = 0; f < 30; f++) d.push([new Date(Date.today().add(f).days()).getTime(), randNum() + f + f + 10]);
  315. var g = {
  316. series: {
  317. lines: {
  318. show: !1,
  319. fill: !0
  320. },
  321. splines: {
  322. show: !0,
  323. tension: .4,
  324. lineWidth: 1,
  325. fill: .4
  326. },
  327. points: {
  328. radius: 0,
  329. show: !0
  330. },
  331. shadowSize: 2
  332. },
  333. grid: {
  334. verticalLines: !0,
  335. hoverable: !0,
  336. clickable: !0,
  337. tickColor: "#d5d5d5",
  338. borderWidth: 1,
  339. color: "#fff"
  340. },
  341. colors: ["rgba(38, 185, 154, 0.38)", "rgba(3, 88, 106, 0.38)"],
  342. xaxis: {
  343. tickColor: "rgba(51, 51, 51, 0.06)",
  344. mode: "time",
  345. tickSize: [1, "day"],
  346. axisLabel: "Date",
  347. axisLabelUseCanvas: !0,
  348. axisLabelFontSizePixels: 12,
  349. axisLabelFontFamily: "Verdana, Arial",
  350. axisLabelPadding: 10
  351. },
  352. yaxis: {
  353. ticks: 8,
  354. tickColor: "rgba(51, 51, 51, 0.06)"
  355. },
  356. tooltip: !1
  357. },
  358. h = {
  359. grid: {
  360. show: !0,
  361. aboveData: !0,
  362. color: "#3f3f3f",
  363. labelMargin: 10,
  364. axisMargin: 0,
  365. borderWidth: 0,
  366. borderColor: null,
  367. minBorderMargin: 5,
  368. clickable: !0,
  369. hoverable: !0,
  370. autoHighlight: !0,
  371. mouseActiveRadius: 100
  372. },
  373. series: {
  374. lines: {
  375. show: !0,
  376. fill: !0,
  377. lineWidth: 2,
  378. steps: !1
  379. },
  380. points: {
  381. show: !0,
  382. radius: 4.5,
  383. symbol: "circle",
  384. lineWidth: 3
  385. }
  386. },
  387. legend: {
  388. position: "ne",
  389. margin: [0, -25],
  390. noColumns: 0,
  391. labelBoxBorderColor: null,
  392. labelFormatter: function (a, b) {
  393. return a + "&nbsp;&nbsp;"
  394. },
  395. width: 40,
  396. height: 1
  397. },
  398. colors: ["#96CA59", "#3F97EB", "#72c380", "#6f7a8a", "#f7cb38", "#5a8022", "#2c7282"],
  399. shadowSize: 0,
  400. tooltip: !0,
  401. tooltipOpts: {
  402. content: "%s: %y.0",
  403. xDateFormat: "%d/%m",
  404. shifts: {
  405. x: -30,
  406. y: -50
  407. },
  408. defaultTheme: !1
  409. },
  410. yaxis: {
  411. min: 0
  412. },
  413. xaxis: {
  414. mode: "time",
  415. minTickSize: [1, "day"],
  416. timeformat: "%d/%m/%y",
  417. min: d[0][0],
  418. max: d[20][0]
  419. }
  420. },
  421. i = {
  422. series: {
  423. curvedLines: {
  424. apply: !0,
  425. active: !0,
  426. monotonicFit: !0
  427. }
  428. },
  429. colors: ["#26B99A"],
  430. grid: {
  431. borderWidth: {
  432. top: 0,
  433. right: 0,
  434. bottom: 1,
  435. left: 1
  436. },
  437. borderColor: {
  438. bottom: "#7F8790",
  439. left: "#7F8790"
  440. }
  441. }
  442. };
  443. $("#chart_plot_01").length && (console.log("Plot1"), $.plot($("#chart_plot_01"), [a, b], g)), $("#chart_plot_02").length && (console.log("Plot2"), $.plot($("#chart_plot_02"), [{
  444. label: "Email Sent",
  445. data: d,
  446. lines: {
  447. fillColor: "rgba(150, 202, 89, 0.12)"
  448. },
  449. points: {
  450. fillColor: "#fff"
  451. }
  452. }], h)), $("#chart_plot_03").length && (console.log("Plot3"), $.plot($("#chart_plot_03"), [{
  453. label: "Registrations",
  454. data: e,
  455. lines: {
  456. fillColor: "rgba(150, 202, 89, 0.12)"
  457. },
  458. points: {
  459. fillColor: "#fff"
  460. }
  461. }], i))
  462. }
  463. }
  464. /* flot - end */
  465. function init_starrr() {
  466. "undefined" != typeof starrr && (console.log("init_starrr"), $(".stars").starrr(), $(".stars-existing").starrr({
  467. rating: 4
  468. }), $(".stars").on("starrr:change", function (a, b) {
  469. $(".stars-count").html(b)
  470. }), $(".stars-existing").on("starrr:change", function (a, b) {
  471. $(".stars-count-existing").html(b)
  472. }))
  473. }
  474. function init_JQVmap() {
  475. "undefined" != typeof jQuery.fn.vectorMap && (console.log("init_JQVmap"), $("#world-map-gdp").length && $("#world-map-gdp").vectorMap({
  476. map: "world_en",
  477. backgroundColor: null,
  478. color: "#ffffff",
  479. hoverOpacity: .7,
  480. selectedColor: "#666666",
  481. enableZoom: !0,
  482. showTooltip: !0,
  483. values: sample_data,
  484. scaleColors: ["#E6F2F0", "#149B7E"],
  485. normalizeFunction: "polynomial"
  486. }), $("#usa_map").length && $("#usa_map").vectorMap({
  487. map: "usa_en",
  488. backgroundColor: null,
  489. color: "#ffffff",
  490. hoverOpacity: .7,
  491. selectedColor: "#666666",
  492. enableZoom: !0,
  493. showTooltip: !0,
  494. values: sample_data,
  495. scaleColors: ["#E6F2F0", "#149B7E"],
  496. normalizeFunction: "polynomial"
  497. }))
  498. }
  499. function init_skycons() {
  500. if ("undefined" != typeof Skycons) {
  501. console.log("init_skycons");
  502. var c, a = new Skycons({
  503. color: "#73879C"
  504. }),
  505. b = ["clear-day", "clear-night", "partly-cloudy-day", "partly-cloudy-night", "cloudy", "rain", "sleet", "snow", "wind", "fog"];
  506. for (c = b.length; c--;) a.set(b[c], b[c]);
  507. a.play()
  508. }
  509. }
  510. function init_chart_doughnut() {
  511. if ("undefined" != typeof Chart && (console.log("init_chart_doughnut"), $(".canvasDoughnut").length)) {
  512. var a = {
  513. type: "doughnut",
  514. tooltipFillColor: "rgba(51, 51, 51, 0.55)",
  515. data: {
  516. labels: ["Symbian", "Blackberry", "Other", "Android", "IOS"],
  517. datasets: [{
  518. data: [15, 20, 30, 10, 30],
  519. backgroundColor: ["#BDC3C7", "#9B59B6", "#E74C3C", "#26B99A", "#3498DB"],
  520. hoverBackgroundColor: ["#CFD4D8", "#B370CF", "#E95E4F", "#36CAAB", "#49A9EA"]
  521. }]
  522. },
  523. options: {
  524. legend: !1,
  525. responsive: !1
  526. }
  527. };
  528. $(".canvasDoughnut").each(function () {
  529. var b = $(this);
  530. new Chart(b, a)
  531. })
  532. }
  533. }
  534. function init_gauge() {
  535. if ("undefined" != typeof Gauge) {
  536. console.log("init_gauge [" + $(".gauge-chart").length + "]"), console.log("init_gauge");
  537. var a = {
  538. lines: 12,
  539. angle: 0,
  540. lineWidth: .4,
  541. pointer: {
  542. length: .75,
  543. strokeWidth: .042,
  544. color: "#1D212A"
  545. },
  546. limitMax: "false",
  547. colorStart: "#1ABC9C",
  548. colorStop: "#1ABC9C",
  549. strokeColor: "#F0F3F3",
  550. generateGradient: !0
  551. };
  552. if ($("#chart_gauge_01").length) var b = document.getElementById("chart_gauge_01"),
  553. c = new Gauge(b).setOptions(a);
  554. if ($("#gauge-text").length && (c.maxValue = 6e3, c.animationSpeed = 32, c.set(3200), c.setTextField(document.getElementById("gauge-text"))), $("#chart_gauge_02").length) var d = document.getElementById("chart_gauge_02"),
  555. e = new Gauge(d).setOptions(a);
  556. $("#gauge-text2").length && (e.maxValue = 9e3, e.animationSpeed = 32, e.set(2400), e.setTextField(document.getElementById("gauge-text2")))
  557. }
  558. }
  559. function init_sparklines() {
  560. "undefined" != typeof jQuery.fn.sparkline && (console.log("init_sparklines"), $(".sparkline_one").sparkline([2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 5, 6, 4, 5, 6, 3, 5, 4, 5, 4, 5, 4, 3, 4, 5, 6, 7, 5, 4, 3, 5, 6], {
  561. type: "bar",
  562. height: "125",
  563. barWidth: 13,
  564. colorMap: {
  565. 7: "#a1a1a1"
  566. },
  567. barSpacing: 2,
  568. barColor: "#26B99A"
  569. }), $(".sparkline_two").sparkline([2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 5, 6, 7, 5, 4, 3, 5, 6], {
  570. type: "bar",
  571. height: "40",
  572. barWidth: 9,
  573. colorMap: {
  574. 7: "#a1a1a1"
  575. },
  576. barSpacing: 2,
  577. barColor: "#26B99A"
  578. }), $(".sparkline_three").sparkline([2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 5, 6, 7, 5, 4, 3, 5, 6], {
  579. type: "line",
  580. width: "200",
  581. height: "40",
  582. lineColor: "#26B99A",
  583. fillColor: "rgba(223, 223, 223, 0.57)",
  584. lineWidth: 2,
  585. spotColor: "#26B99A",
  586. minSpotColor: "#26B99A"
  587. }), $(".sparkline11").sparkline([2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 6, 2, 4, 3, 4, 5, 4, 5, 4, 3], {
  588. type: "bar",
  589. height: "40",
  590. barWidth: 8,
  591. colorMap: {
  592. 7: "#a1a1a1"
  593. },
  594. barSpacing: 2,
  595. barColor: "#26B99A"
  596. }), $(".sparkline22").sparkline([2, 4, 3, 4, 7, 5, 4, 3, 5, 6, 2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 6], {
  597. type: "line",
  598. height: "40",
  599. width: "200",
  600. lineColor: "#26B99A",
  601. fillColor: "#ffffff",
  602. lineWidth: 3,
  603. spotColor: "#34495E",
  604. minSpotColor: "#34495E"
  605. }), $(".sparkline_bar").sparkline([2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 5, 6, 4, 5, 6, 3, 5], {
  606. type: "bar",
  607. colorMap: {
  608. 7: "#a1a1a1"
  609. },
  610. barColor: "#26B99A"
  611. }), $(".sparkline_area").sparkline([5, 6, 7, 9, 9, 5, 3, 2, 2, 4, 6, 7], {
  612. type: "line",
  613. lineColor: "#26B99A",
  614. fillColor: "#26B99A",
  615. spotColor: "#4578a0",
  616. minSpotColor: "#728fb2",
  617. maxSpotColor: "#6d93c4",
  618. highlightSpotColor: "#ef5179",
  619. highlightLineColor: "#8ba8bf",
  620. spotRadius: 2.5,
  621. width: 85
  622. }), $(".sparkline_line").sparkline([2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 5, 6, 4, 5, 6, 3, 5], {
  623. type: "line",
  624. lineColor: "#26B99A",
  625. fillColor: "#ffffff",
  626. width: 85,
  627. spotColor: "#34495E",
  628. minSpotColor: "#34495E"
  629. }), $(".sparkline_pie").sparkline([1, 1, 2, 1], {
  630. type: "pie",
  631. sliceColors: ["#26B99A", "#ccc", "#75BCDD", "#D66DE2"]
  632. }), $(".sparkline_discreet").sparkline([4, 6, 7, 7, 4, 3, 2, 1, 4, 4, 2, 4, 3, 7, 8, 9, 7, 6, 4, 3], {
  633. type: "discrete",
  634. barWidth: 3,
  635. lineColor: "#26B99A",
  636. width: "85"
  637. }))
  638. }
  639. function init_autocomplete() {
  640. if ("undefined" != typeof autocomplete) {
  641. console.log("init_autocomplete");
  642. var a = {
  643. AD: "Andorra",
  644. A2: "Andorra Test",
  645. AE: "United Arab Emirates",
  646. AF: "Afghanistan",
  647. AG: "Antigua and Barbuda",
  648. AI: "Anguilla",
  649. AL: "Albania",
  650. AM: "Armenia",
  651. AN: "Netherlands Antilles",
  652. AO: "Angola",
  653. AQ: "Antarctica",
  654. AR: "Argentina",
  655. AS: "American Samoa",
  656. AT: "Austria",
  657. AU: "Australia",
  658. AW: "Aruba",
  659. AX: "Åland Islands",
  660. AZ: "Azerbaijan",
  661. BA: "Bosnia and Herzegovina",
  662. BB: "Barbados",
  663. BD: "Bangladesh",
  664. BE: "Belgium",
  665. BF: "Burkina Faso",
  666. BG: "Bulgaria",
  667. BH: "Bahrain",
  668. BI: "Burundi",
  669. BJ: "Benin",
  670. BL: "Saint Barthélemy",
  671. BM: "Bermuda",
  672. BN: "Brunei",
  673. BO: "Bolivia",
  674. BQ: "British Antarctic Territory",
  675. BR: "Brazil",
  676. BS: "Bahamas",
  677. BT: "Bhutan",
  678. BV: "Bouvet Island",
  679. BW: "Botswana",
  680. BY: "Belarus",
  681. BZ: "Belize",
  682. CA: "Canada",
  683. CC: "Cocos [Keeling] Islands",
  684. CD: "Congo - Kinshasa",
  685. CF: "Central African Republic",
  686. CG: "Congo - Brazzaville",
  687. CH: "Switzerland",
  688. CI: "Côte d’Ivoire",
  689. CK: "Cook Islands",
  690. CL: "Chile",
  691. CM: "Cameroon",
  692. CN: "China",
  693. CO: "Colombia",
  694. CR: "Costa Rica",
  695. CS: "Serbia and Montenegro",
  696. CT: "Canton and Enderbury Islands",
  697. CU: "Cuba",
  698. CV: "Cape Verde",
  699. CX: "Christmas Island",
  700. CY: "Cyprus",
  701. CZ: "Czech Republic",
  702. DD: "East Germany",
  703. DE: "Germany",
  704. DJ: "Djibouti",
  705. DK: "Denmark",
  706. DM: "Dominica",
  707. DO: "Dominican Republic",
  708. DZ: "Algeria",
  709. EC: "Ecuador",
  710. EE: "Estonia",
  711. EG: "Egypt",
  712. EH: "Western Sahara",
  713. ER: "Eritrea",
  714. ES: "Spain",
  715. ET: "Ethiopia",
  716. FI: "Finland",
  717. FJ: "Fiji",
  718. FK: "Falkland Islands",
  719. FM: "Micronesia",
  720. FO: "Faroe Islands",
  721. FQ: "French Southern and Antarctic Territories",
  722. FR: "France",
  723. FX: "Metropolitan France",
  724. GA: "Gabon",
  725. GB: "United Kingdom",
  726. GD: "Grenada",
  727. GE: "Georgia",
  728. GF: "French Guiana",
  729. GG: "Guernsey",
  730. GH: "Ghana",
  731. GI: "Gibraltar",
  732. GL: "Greenland",
  733. GM: "Gambia",
  734. GN: "Guinea",
  735. GP: "Guadeloupe",
  736. GQ: "Equatorial Guinea",
  737. GR: "Greece",
  738. GS: "South Georgia and the South Sandwich Islands",
  739. GT: "Guatemala",
  740. GU: "Guam",
  741. GW: "Guinea-Bissau",
  742. GY: "Guyana",
  743. HK: "Hong Kong SAR China",
  744. HM: "Heard Island and McDonald Islands",
  745. HN: "Honduras",
  746. HR: "Croatia",
  747. HT: "Haiti",
  748. HU: "Hungary",
  749. ID: "Indonesia",
  750. IE: "Ireland",
  751. IL: "Israel",
  752. IM: "Isle of Man",
  753. IN: "India",
  754. IO: "British Indian Ocean Territory",
  755. IQ: "Iraq",
  756. IR: "Iran",
  757. IS: "Iceland",
  758. IT: "Italy",
  759. JE: "Jersey",
  760. JM: "Jamaica",
  761. JO: "Jordan",
  762. JP: "Japan",
  763. JT: "Johnston Island",
  764. KE: "Kenya",
  765. KG: "Kyrgyzstan",
  766. KH: "Cambodia",
  767. KI: "Kiribati",
  768. KM: "Comoros",
  769. KN: "Saint Kitts and Nevis",
  770. KP: "North Korea",
  771. KR: "South Korea",
  772. KW: "Kuwait",
  773. KY: "Cayman Islands",
  774. KZ: "Kazakhstan",
  775. LA: "Laos",
  776. LB: "Lebanon",
  777. LC: "Saint Lucia",
  778. LI: "Liechtenstein",
  779. LK: "Sri Lanka",
  780. LR: "Liberia",
  781. LS: "Lesotho",
  782. LT: "Lithuania",
  783. LU: "Luxembourg",
  784. LV: "Latvia",
  785. LY: "Libya",
  786. MA: "Morocco",
  787. MC: "Monaco",
  788. MD: "Moldova",
  789. ME: "Montenegro",
  790. MF: "Saint Martin",
  791. MG: "Madagascar",
  792. MH: "Marshall Islands",
  793. MI: "Midway Islands",
  794. MK: "Macedonia",
  795. ML: "Mali",
  796. MM: "Myanmar [Burma]",
  797. MN: "Mongolia",
  798. MO: "Macau SAR China",
  799. MP: "Northern Mariana Islands",
  800. MQ: "Martinique",
  801. MR: "Mauritania",
  802. MS: "Montserrat",
  803. MT: "Malta",
  804. MU: "Mauritius",
  805. MV: "Maldives",
  806. MW: "Malawi",
  807. MX: "Mexico",
  808. MY: "Malaysia",
  809. MZ: "Mozambique",
  810. NA: "Namibia",
  811. NC: "New Caledonia",
  812. NE: "Niger",
  813. NF: "Norfolk Island",
  814. NG: "Nigeria",
  815. NI: "Nicaragua",
  816. NL: "Netherlands",
  817. NO: "Norway",
  818. NP: "Nepal",
  819. NQ: "Dronning Maud Land",
  820. NR: "Nauru",
  821. NT: "Neutral Zone",
  822. NU: "Niue",
  823. NZ: "New Zealand",
  824. OM: "Oman",
  825. PA: "Panama",
  826. PC: "Pacific Islands Trust Territory",
  827. PE: "Peru",
  828. PF: "French Polynesia",
  829. PG: "Papua New Guinea",
  830. PH: "Philippines",
  831. PK: "Pakistan",
  832. PL: "Poland",
  833. PM: "Saint Pierre and Miquelon",
  834. PN: "Pitcairn Islands",
  835. PR: "Puerto Rico",
  836. PS: "Palestinian Territories",
  837. PT: "Portugal",
  838. PU: "U.S. Miscellaneous Pacific Islands",
  839. PW: "Palau",
  840. PY: "Paraguay",
  841. PZ: "Panama Canal Zone",
  842. QA: "Qatar",
  843. RE: "Réunion",
  844. RO: "Romania",
  845. RS: "Serbia",
  846. RU: "Russia",
  847. RW: "Rwanda",
  848. SA: "Saudi Arabia",
  849. SB: "Solomon Islands",
  850. SC: "Seychelles",
  851. SD: "Sudan",
  852. SE: "Sweden",
  853. SG: "Singapore",
  854. SH: "Saint Helena",
  855. SI: "Slovenia",
  856. SJ: "Svalbard and Jan Mayen",
  857. SK: "Slovakia",
  858. SL: "Sierra Leone",
  859. SM: "San Marino",
  860. SN: "Senegal",
  861. SO: "Somalia",
  862. SR: "Suriname",
  863. ST: "São Tomé and Príncipe",
  864. SU: "Union of Soviet Socialist Republics",
  865. SV: "El Salvador",
  866. SY: "Syria",
  867. SZ: "Swaziland",
  868. TC: "Turks and Caicos Islands",
  869. TD: "Chad",
  870. TF: "French Southern Territories",
  871. TG: "Togo",
  872. TH: "Thailand",
  873. TJ: "Tajikistan",
  874. TK: "Tokelau",
  875. TL: "Timor-Leste",
  876. TM: "Turkmenistan",
  877. TN: "Tunisia",
  878. TO: "Tonga",
  879. TR: "Turkey",
  880. TT: "Trinidad and Tobago",
  881. TV: "Tuvalu",
  882. TW: "Taiwan",
  883. TZ: "Tanzania",
  884. UA: "Ukraine",
  885. UG: "Uganda",
  886. UM: "U.S. Minor Outlying Islands",
  887. US: "United States",
  888. UY: "Uruguay",
  889. UZ: "Uzbekistan",
  890. VA: "Vatican City",
  891. VC: "Saint Vincent and the Grenadines",
  892. VD: "North Vietnam",
  893. VE: "Venezuela",
  894. VG: "British Virgin Islands",
  895. VI: "U.S. Virgin Islands",
  896. VN: "Vietnam",
  897. VU: "Vanuatu",
  898. WF: "Wallis and Futuna",
  899. WK: "Wake Island",
  900. WS: "Samoa",
  901. YD: "People's Democratic Republic of Yemen",
  902. YE: "Yemen",
  903. YT: "Mayotte",
  904. ZA: "South Africa",
  905. ZM: "Zambia",
  906. ZW: "Zimbabwe",
  907. ZZ: "Unknown or Invalid Region"
  908. },
  909. b = $.map(a, function (a, b) {
  910. return {
  911. value: a,
  912. data: b
  913. }
  914. });
  915. $("#autocomplete-custom-append").autocomplete({
  916. lookup: b
  917. })
  918. }
  919. }
  920. function init_autosize() {
  921. "undefined" != typeof $.fn.autosize && autosize($(".resizable_textarea"))
  922. }
  923. function init_parsley() {
  924. if ("undefined" != typeof parsley) {
  925. console.log("init_parsley"), $("parsley:field:validate", function () {
  926. a()
  927. }), $("#demo-form .btn").on("click", function () {
  928. $("#demo-form").parsley().validate(), a()
  929. });
  930. var a = function () {
  931. !0 === $("#demo-form").parsley().isValid() ? ($(".bs-callout-info").removeClass("hidden"), $(".bs-callout-warning").addClass("hidden")) : ($(".bs-callout-info").addClass("hidden"), $(".bs-callout-warning").removeClass("hidden"))
  932. };
  933. $("parsley:field:validate", function () {
  934. a()
  935. }), $("#demo-form2 .btn").on("click", function () {
  936. $("#demo-form2").parsley().validate(), a()
  937. });
  938. var a = function () {
  939. !0 === $("#demo-form2").parsley().isValid() ? ($(".bs-callout-info").removeClass("hidden"), $(".bs-callout-warning").addClass("hidden")) : ($(".bs-callout-info").addClass("hidden"), $(".bs-callout-warning").removeClass("hidden"))
  940. };
  941. try {
  942. hljs.initHighlightingOnLoad()
  943. } catch (a) {
  944. }
  945. }
  946. }
  947. function onAddTag(a) {
  948. alert("Added a tag: " + a)
  949. }
  950. function onRemoveTag(a) {
  951. alert("Removed a tag: " + a)
  952. }
  953. function onChangeTag(a, b) {
  954. alert("Changed a tag: " + b)
  955. }
  956. function init_TagsInput() {
  957. "undefined" != typeof $.fn.tagsInput && $("#tags_1").tagsInput({
  958. width: "auto"
  959. })
  960. }
  961. function init_select2() {
  962. "undefined" != typeof select2 && (console.log("init_toolbox"), $(".select2_single").select2({
  963. placeholder: "Select a state",
  964. allowClear: !0
  965. }), $(".select2_group").select2({}), $(".select2_multiple").select2({
  966. maximumSelectionLength: 4,
  967. placeholder: "With Max Selection limit 4",
  968. allowClear: !0
  969. }))
  970. }
  971. function init_wysiwyg() {
  972. function b(a, b) {
  973. var c = "";
  974. "unsupported-file-type" === a ? c = "Unsupported format " + b : console.log("error uploading file", a, b), $('<div class="alert"> <button type="button" class="close" data-dismiss="alert">&times;</button><strong>File upload error</strong> ' + c + " </div>").prependTo("#alerts")
  975. }
  976. "undefined" != typeof $.fn.wysiwyg && (console.log("init_wysiwyg"), $(".editor-wrapper").each(function () {
  977. var a = $(this).attr("id");
  978. $(this).wysiwyg({
  979. toolbarSelector: '[data-target="#' + a + '"]',
  980. fileUploadError: b
  981. })
  982. }), window.prettyPrint, prettyPrint())
  983. }
  984. function init_cropper() {
  985. if ("undefined" != typeof $.fn.cropper) {
  986. console.log("init_cropper");
  987. var a = $("#image"),
  988. b = $("#download"),
  989. c = $("#dataX"),
  990. d = $("#dataY"),
  991. e = $("#dataHeight"),
  992. f = $("#dataWidth"),
  993. g = $("#dataRotate"),
  994. h = $("#dataScaleX"),
  995. i = $("#dataScaleY"),
  996. j = {
  997. aspectRatio: 16 / 9,
  998. preview: ".img-preview",
  999. crop: function (a) {
  1000. c.val(Math.round(a.x)), d.val(Math.round(a.y)), e.val(Math.round(a.height)), f.val(Math.round(a.width)), g.val(a.rotate), h.val(a.scaleX), i.val(a.scaleY)
  1001. }
  1002. };
  1003. $('[data-toggle="tooltip"]').tooltip(), a.on({
  1004. "build.cropper": function (a) {
  1005. console.log(a.type)
  1006. },
  1007. "built.cropper": function (a) {
  1008. console.log(a.type)
  1009. },
  1010. "cropstart.cropper": function (a) {
  1011. console.log(a.type, a.action)
  1012. },
  1013. "cropmove.cropper": function (a) {
  1014. console.log(a.type, a.action)
  1015. },
  1016. "cropend.cropper": function (a) {
  1017. console.log(a.type, a.action)
  1018. },
  1019. "crop.cropper": function (a) {
  1020. console.log(a.type, a.x, a.y, a.width, a.height, a.rotate, a.scaleX, a.scaleY)
  1021. },
  1022. "zoom.cropper": function (a) {
  1023. console.log(a.type, a.ratio)
  1024. }
  1025. }).cropper(j), $.isFunction(document.createElement("canvas").getContext) || $('button[data-method="getCroppedCanvas"]').prop("disabled", !0), "undefined" == typeof document.createElement("cropper").style.transition && ($('button[data-method="rotate"]').prop("disabled", !0), $('button[data-method="scale"]').prop("disabled", !0)), "undefined" == typeof b[0].download && b.addClass("disabled"), $(".docs-toggles").on("change", "input", function () {
  1026. var e, f, b = $(this),
  1027. c = b.attr("name"),
  1028. d = b.prop("type");
  1029. a.data("cropper") && ("checkbox" === d ? (j[c] = b.prop("checked"), e = a.cropper("getCropBoxData"), f = a.cropper("getCanvasData"), j.built = function () {
  1030. a.cropper("setCropBoxData", e), a.cropper("setCanvasData", f)
  1031. }) : "radio" === d && (j[c] = b.val()), a.cropper("destroy").cropper(j))
  1032. }), $(".docs-buttons").on("click", "[data-method]", function () {
  1033. var e, f, c = $(this),
  1034. d = c.data();
  1035. if (!c.prop("disabled") && !c.hasClass("disabled") && a.data("cropper") && d.method) {
  1036. if (d = $.extend({}, d), "undefined" != typeof d.target && (e = $(d.target), "undefined" == typeof d.option)) try {
  1037. d.option = JSON.parse(e.val())
  1038. } catch (a) {
  1039. console.log(a.message)
  1040. }
  1041. switch (f = a.cropper(d.method, d.option, d.secondOption), d.method) {
  1042. case "scaleX":
  1043. case "scaleY":
  1044. $(this).data("option", -d.option);
  1045. break;
  1046. case "getCroppedCanvas":
  1047. f && ($("#getCroppedCanvasModal").modal().find(".modal-body").html(f), b.hasClass("disabled") || b.attr("href", f.toDataURL()))
  1048. }
  1049. if ($.isPlainObject(f) && e) try {
  1050. e.val(JSON.stringify(f))
  1051. } catch (a) {
  1052. console.log(a.message)
  1053. }
  1054. }
  1055. }), $(document.body).on("keydown", function (b) {
  1056. if (a.data("cropper") && !(this.scrollTop > 300)) switch (b.which) {
  1057. case 37:
  1058. b.preventDefault(), a.cropper("move", -1, 0);
  1059. break;
  1060. case 38:
  1061. b.preventDefault(), a.cropper("move", 0, -1);
  1062. break;
  1063. case 39:
  1064. b.preventDefault(), a.cropper("move", 1, 0);
  1065. break;
  1066. case 40:
  1067. b.preventDefault(), a.cropper("move", 0, 1)
  1068. }
  1069. });
  1070. var m, k = $("#inputImage"),
  1071. l = window.URL || window.webkitURL;
  1072. l ? k.change(function () {
  1073. var c, b = this.files;
  1074. a.data("cropper") && b && b.length && (c = b[0], /^image\/\w+$/.test(c.type) ? (m = l.createObjectURL(c), a.one("built.cropper", function () {
  1075. l.revokeObjectURL(m)
  1076. }).cropper("reset").cropper("replace", m), k.val("")) : window.alert("Please choose an image file."))
  1077. }) : k.prop("disabled", !0).parent().addClass("disabled")
  1078. }
  1079. }
  1080. function init_knob() {
  1081. if ("undefined" != typeof $.fn.knob) {
  1082. console.log("init_knob"), $(".knob").knob({
  1083. change: function (a) {
  1084. },
  1085. release: function (a) {
  1086. console.log("release : " + a)
  1087. },
  1088. cancel: function () {
  1089. console.log("cancel : ", this)
  1090. },
  1091. draw: function () {
  1092. if ("tron" == this.$.data("skin")) {
  1093. this.cursorExt = .3;
  1094. var b, a = this.arc(this.cv),
  1095. c = 1;
  1096. return this.g.lineWidth = this.lineWidth, this.o.displayPrevious && (b = this.arc(this.v), this.g.beginPath(), this.g.strokeStyle = this.pColor, this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, b.s, b.e, b.d), this.g.stroke()), this.g.beginPath(), this.g.strokeStyle = c ? this.o.fgColor : this.fgColor, this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, a.s, a.e, a.d), this.g.stroke(), this.g.lineWidth = 2, this.g.beginPath(), this.g.strokeStyle = this.o.fgColor, this.g.arc(this.xy, this.xy, this.radius - this.lineWidth + 1 + 2 * this.lineWidth / 3, 0, 2 * Math.PI, !1), this.g.stroke(), !1
  1097. }
  1098. }
  1099. });
  1100. var a, b = 0,
  1101. c = 0,
  1102. d = 0,
  1103. e = $("div.idir"),
  1104. f = $("div.ival"),
  1105. g = function () {
  1106. d++, e.show().html("+").fadeOut(), f.html(d)
  1107. },
  1108. h = function () {
  1109. d--, e.show().html("-").fadeOut(), f.html(d)
  1110. };
  1111. $("input.infinite").knob({
  1112. min: 0,
  1113. max: 20,
  1114. stopper: !1,
  1115. change: function () {
  1116. a > this.cv ? b ? (h(), b = 0) : (b = 1, c = 0) : a < this.cv && (c ? (g(), c = 0) : (c = 1, b = 0)), a = this.cv
  1117. }
  1118. })
  1119. }
  1120. }
  1121. function init_InputMask() {
  1122. "undefined" != typeof $.fn.inputmask && (console.log("init_InputMask"), $(":input").inputmask())
  1123. }
  1124. function init_ColorPicker() {
  1125. "undefined" != typeof $.fn.colorpicker && (console.log("init_ColorPicker"), $(".demo1").colorpicker(), $(".demo2").colorpicker( {format: 'auto'}), $("#demo_forceformat").colorpicker({
  1126. format: "rgba",
  1127. horizontal: !0
  1128. }), $("#demo_forceformat3").colorpicker({
  1129. format: "rgba"
  1130. }), $(".demo-auto").colorpicker())
  1131. }
  1132. function init_IonRangeSlider() {
  1133. "undefined" != typeof $.fn.ionRangeSlider && (console.log("init_IonRangeSlider"), $("#range_27").ionRangeSlider({
  1134. type: "double",
  1135. min: 1e6,
  1136. max: 2e6,
  1137. grid: !0,
  1138. force_edges: !0
  1139. }), $("#range").ionRangeSlider({
  1140. hide_min_max: !0,
  1141. keyboard: !0,
  1142. min: 0,
  1143. max: 5e3,
  1144. from: 1e3,
  1145. to: 4e3,
  1146. type: "double",
  1147. step: 1,
  1148. prefix: "$",
  1149. grid: !0
  1150. }), $("#range_25").ionRangeSlider({
  1151. type: "double",
  1152. min: 1e6,
  1153. max: 2e6,
  1154. grid: !0
  1155. }), $("#range_26").ionRangeSlider({
  1156. type: "double",
  1157. min: 0,
  1158. max: 1e4,
  1159. step: 500,
  1160. grid: !0,
  1161. grid_snap: !0
  1162. }), $("#range_31").ionRangeSlider({
  1163. type: "double",
  1164. min: 0,
  1165. max: 100,
  1166. from: 30,
  1167. to: 70,
  1168. from_fixed: !0
  1169. }), $(".range_min_max").ionRangeSlider({
  1170. type: "double",
  1171. min: 0,
  1172. max: 100,
  1173. from: 30,
  1174. to: 70,
  1175. max_interval: 50
  1176. }), $(".range_time24").ionRangeSlider({
  1177. min: +moment().subtract(12, "hours").format("X"),
  1178. max: +moment().format("X"),
  1179. from: +moment().subtract(6, "hours").format("X"),
  1180. grid: !0,
  1181. force_edges: !0,
  1182. prettify: function (a) {
  1183. var b = moment(a, "X");
  1184. return b.format("Do MMMM, HH:mm")
  1185. }
  1186. }))
  1187. }
  1188. function init_daterangepicker() {
  1189. if ("undefined" != typeof $.fn.daterangepicker) {
  1190. console.log("init_daterangepicker");
  1191. var a = function (a, b, c) {
  1192. console.log(a.toISOString(), b.toISOString(), c), $("#reportrange span").html(a.format("MMMM D, YYYY") + " - " + b.format("MMMM D, YYYY"))
  1193. },
  1194. b = {
  1195. startDate: moment().subtract(29, "days"),
  1196. endDate: moment(),
  1197. minDate: "01/01/2012",
  1198. maxDate: "12/31/2015",
  1199. dateLimit: {
  1200. days: 60
  1201. },
  1202. showDropdowns: !0,
  1203. showWeekNumbers: !0,
  1204. timePicker: !1,
  1205. timePickerIncrement: 1,
  1206. timePicker12Hour: !0,
  1207. ranges: {
  1208. Today: [moment(), moment()],
  1209. Yesterday: [moment().subtract(1, "days"), moment().subtract(1, "days")],
  1210. "Last 7 Days": [moment().subtract(6, "days"), moment()],
  1211. "Last 30 Days": [moment().subtract(29, "days"), moment()],
  1212. "This Month": [moment().startOf("month"), moment().endOf("month")],
  1213. "Last Month": [moment().subtract(1, "month").startOf("month"), moment().subtract(1, "month").endOf("month")]
  1214. },
  1215. opens: "left",
  1216. buttonClasses: ["btn btn-default"],
  1217. applyClass: "btn-small btn-primary",
  1218. cancelClass: "btn-small",
  1219. format: "MM/DD/YYYY",
  1220. separator: " to ",
  1221. locale: {
  1222. applyLabel: "Submit",
  1223. cancelLabel: "Clear",
  1224. fromLabel: "From",
  1225. toLabel: "To",
  1226. customRangeLabel: "Custom",
  1227. daysOfWeek: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
  1228. monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  1229. firstDay: 1
  1230. }
  1231. };
  1232. $("#reportrange span").html(moment().subtract(29, "days").format("MMMM D, YYYY") + " - " + moment().format("MMMM D, YYYY")), $("#reportrange").daterangepicker(b, a), $("#reportrange").on("show.daterangepicker", function () {
  1233. console.log("show event fired")
  1234. }), $("#reportrange").on("hide.daterangepicker", function () {
  1235. console.log("hide event fired")
  1236. }), $("#reportrange").on("apply.daterangepicker", function (a, b) {
  1237. console.log("apply event fired, start/end dates are " + b.startDate.format("MMMM D, YYYY") + " to " + b.endDate.format("MMMM D, YYYY"))
  1238. }), $("#reportrange").on("cancel.daterangepicker", function (a, b) {
  1239. console.log("cancel event fired")
  1240. }), $("#options1").click(function () {
  1241. $("#reportrange").data("daterangepicker").setOptions(b, a)
  1242. }), $("#options2").click(function () {
  1243. $("#reportrange").data("daterangepicker").setOptions(optionSet2, a)
  1244. }), $("#destroy").click(function () {
  1245. $("#reportrange").data("daterangepicker").remove()
  1246. })
  1247. }
  1248. }
  1249. function init_daterangepicker_right() {
  1250. if ("undefined" != typeof $.fn.daterangepicker) {
  1251. console.log("init_daterangepicker_right");
  1252. var a = function (a, b, c) {
  1253. console.log(a.toISOString(), b.toISOString(), c), $("#reportrange_right span").html(a.format("MMMM D, YYYY") + " - " + b.format("MMMM D, YYYY"))
  1254. },
  1255. b = {
  1256. startDate: moment().subtract(29, "days"),
  1257. endDate: moment(),
  1258. minDate: "01/01/2012",
  1259. maxDate: "12/31/2020",
  1260. dateLimit: {
  1261. days: 60
  1262. },
  1263. showDropdowns: !0,
  1264. showWeekNumbers: !0,
  1265. timePicker: !1,
  1266. timePickerIncrement: 1,
  1267. timePicker12Hour: !0,
  1268. ranges: {
  1269. Today: [moment(), moment()],
  1270. Yesterday: [moment().subtract(1, "days"), moment().subtract(1, "days")],
  1271. "Last 7 Days": [moment().subtract(6, "days"), moment()],
  1272. "Last 30 Days": [moment().subtract(29, "days"), moment()],
  1273. "This Month": [moment().startOf("month"), moment().endOf("month")],
  1274. "Last Month": [moment().subtract(1, "month").startOf("month"), moment().subtract(1, "month").endOf("month")]
  1275. },
  1276. opens: "right",
  1277. buttonClasses: ["btn btn-default"],
  1278. applyClass: "btn-small btn-primary",
  1279. cancelClass: "btn-small",
  1280. format: "MM/DD/YYYY",
  1281. separator: " to ",
  1282. locale: {
  1283. applyLabel: "Submit",
  1284. cancelLabel: "Clear",
  1285. fromLabel: "From",
  1286. toLabel: "To",
  1287. customRangeLabel: "Custom",
  1288. daysOfWeek: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
  1289. monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  1290. firstDay: 1
  1291. }
  1292. };
  1293. $("#reportrange_right span").html(moment().subtract(29, "days").format("MMMM D, YYYY") + " - " + moment().format("MMMM D, YYYY")), $("#reportrange_right").daterangepicker(b, a), $("#reportrange_right").on("show.daterangepicker", function () {
  1294. console.log("show event fired")
  1295. }), $("#reportrange_right").on("hide.daterangepicker", function () {
  1296. console.log("hide event fired")
  1297. }), $("#reportrange_right").on("apply.daterangepicker", function (a, b) {
  1298. console.log("apply event fired, start/end dates are " + b.startDate.format("MMMM D, YYYY") + " to " + b.endDate.format("MMMM D, YYYY"))
  1299. }), $("#reportrange_right").on("cancel.daterangepicker", function (a, b) {
  1300. console.log("cancel event fired")
  1301. }), $("#options1").click(function () {
  1302. $("#reportrange_right").data("daterangepicker").setOptions(b, a)
  1303. }), $("#options2").click(function () {
  1304. $("#reportrange_right").data("daterangepicker").setOptions(optionSet2, a)
  1305. }), $("#destroy").click(function () {
  1306. $("#reportrange_right").data("daterangepicker").remove()
  1307. })
  1308. }
  1309. }
  1310. function init_daterangepicker_single_call() {
  1311. "undefined" != typeof $.fn.daterangepicker && (console.log("init_daterangepicker_single_call"), $("#single_cal1").daterangepicker({
  1312. singleDatePicker: !0,
  1313. singleClasses: "picker_1"
  1314. }, function (a, b, c) {
  1315. console.log(a.toISOString(), b.toISOString(), c)
  1316. }), $("#single_cal2").daterangepicker({
  1317. singleDatePicker: !0,
  1318. singleClasses: "picker_2"
  1319. }, function (a, b, c) {
  1320. console.log(a.toISOString(), b.toISOString(), c)
  1321. }), $("#single_cal3").daterangepicker({
  1322. singleDatePicker: !0,
  1323. singleClasses: "picker_3"
  1324. }, function (a, b, c) {
  1325. console.log(a.toISOString(), b.toISOString(), c)
  1326. }), $("#single_cal4").daterangepicker({
  1327. singleDatePicker: !0,
  1328. singleClasses: "picker_4"
  1329. }, function (a, b, c) {
  1330. console.log(a.toISOString(), b.toISOString(), c)
  1331. }))
  1332. }
  1333. function init_daterangepicker_reservation() {
  1334. "undefined" != typeof $.fn.daterangepicker && (console.log("init_daterangepicker_reservation"), $("#reservation").daterangepicker(null, function (a, b, c) {
  1335. console.log(a.toISOString(), b.toISOString(), c)
  1336. }), $("#reservation-time").daterangepicker({
  1337. timePicker: !0,
  1338. timePickerIncrement: 30,
  1339. locale: {
  1340. format: "MM/DD/YYYY h:mm A"
  1341. }
  1342. }))
  1343. }
  1344. function init_SmartWizard() {
  1345. "undefined" != typeof $.fn.smartWizard && (console.log("init_SmartWizard"), $("#wizard").smartWizard(), $("#wizard_verticle").smartWizard({
  1346. transitionEffect: "slide"
  1347. }), $(".buttonNext").addClass("btn btn-success"), $(".buttonPrevious").addClass("btn btn-primary"), $(".buttonFinish").addClass("btn btn-default"))
  1348. }
  1349. function init_validator() {
  1350. "undefined" != typeof validator && (console.log("init_validator"), validator.message.date = "not a real date", $("form").on("blur", "input[required], input.optional, select.required", validator.checkField).on("change", "select.required", validator.checkField).on("keypress", "input[required][pattern]", validator.keypress), $(".multi.required").on("keyup blur", "input", function () {
  1351. validator.checkField.apply($(this).siblings().last()[0])
  1352. }), $("form").submit(function (a) {
  1353. a.preventDefault();
  1354. var b = !0;
  1355. return validator.checkAll($(this)) || (b = !1), b && this.submit(), !1
  1356. }))
  1357. }
  1358. function init_PNotify() {
  1359. "undefined" != typeof PNotify && (console.log("init_PNotify"), new PNotify({
  1360. title: "PNotify",
  1361. type: "info",
  1362. text: "Welcome. Try hovering over me. You can click things behind me, because I'm non-blocking.",
  1363. nonblock: {
  1364. nonblock: !0
  1365. },
  1366. addclass: "dark",
  1367. styling: "bootstrap3",
  1368. hide: !1,
  1369. before_close: function (a) {
  1370. return a.update({
  1371. title: a.options.title + " - Enjoy your Stay",
  1372. before_close: null
  1373. }), a.queueRemove(), !1
  1374. }
  1375. }))
  1376. }
  1377. function init_CustomNotification() {
  1378. if (console.log("run_customtabs"), "undefined" != typeof CustomTabs) {
  1379. console.log("init_CustomTabs");
  1380. var a = 10;
  1381. TabbedNotification = function (b) {
  1382. var c = "<div id='ntf" + a + "' class='text alert-" + b.type + "' style='display:none'><h2><i class='fa fa-bell'></i> " + b.title + "</h2><div class='close'><a href='javascript:;' class='notification_close'><i class='fa fa-close'></i></a></div><p>" + b.text + "</p></div>";
  1383. document.getElementById("custom_notifications") ? ($("#custom_notifications ul.notifications").append("<li><a id='ntlink" + a + "' class='alert-" + b.type + "' href='#ntf" + a + "'><i class='fa fa-bell animated shake'></i></a></li>"), $("#custom_notifications #notif-group").append(c), a++, CustomTabs(b)) : alert("doesnt exists")
  1384. }, CustomTabs = function (a) {
  1385. $(".tabbed_notifications > div").hide(), $(".tabbed_notifications > div:first-of-type").show(), $("#custom_notifications").removeClass("dsp_none"), $(".notifications a").click(function (a) {
  1386. a.preventDefault();
  1387. var b = $(this),
  1388. c = "#" + b.parents(".notifications").data("tabbed_notifications"),
  1389. d = b.closest("li").siblings().children("a"),
  1390. e = b.attr("href");
  1391. d.removeClass("active"), b.addClass("active"), $(c).children("div").hide(), $(e).show()
  1392. })
  1393. }, CustomTabs();
  1394. var b = idname = "";
  1395. $(document).on("click", ".notification_close", function (a) {
  1396. idname = $(this).parent().parent().attr("id"), b = idname.substr(-2), $("#ntf" + b).remove(), $("#ntlink" + b).parent().remove(), $(".notifications a").first().addClass("active"), $("#notif-group div").first().css("display", "block")
  1397. })
  1398. }
  1399. }
  1400. function init_EasyPieChart() {
  1401. if ("undefined" != typeof $.fn.easyPieChart) {
  1402. console.log("init_EasyPieChart"), $(".chart").easyPieChart({
  1403. easing: "easeOutElastic",
  1404. delay: 3e3,
  1405. barColor: "#26B99A",
  1406. trackColor: "#fff",
  1407. scaleColor: !1,
  1408. lineWidth: 20,
  1409. trackWidth: 16,
  1410. lineCap: "butt",
  1411. onStep: function (a, b, c) {
  1412. $(this.el).find(".percent").text(Math.round(c))
  1413. }
  1414. });
  1415. var a = window.chart = $(".chart").data("easyPieChart");
  1416. $(".js_update").on("click", function () {
  1417. a.update(200 * Math.random() - 100)
  1418. });
  1419. var b = $.fn.popover.Constructor.prototype.leave;
  1420. $.fn.popover.Constructor.prototype.leave = function (a) {
  1421. var d, e,
  1422. c = a instanceof this.constructor ? a : $(a.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type);
  1423. b.call(this, a), a.currentTarget && (d = $(a.currentTarget).siblings(".popover"), e = c.timeout, d.one("mouseenter", function () {
  1424. clearTimeout(e), d.one("mouseleave", function () {
  1425. $.fn.popover.Constructor.prototype.leave.call(c, c)
  1426. })
  1427. }))
  1428. }, $("body").popover({
  1429. selector: "[data-popover]",
  1430. trigger: "click hover",
  1431. delay: {
  1432. show: 50,
  1433. hide: 400
  1434. }
  1435. })
  1436. }
  1437. }
  1438. function init_charts() {
  1439. if (console.log("run_charts typeof [" + typeof Chart + "]"), "undefined" != typeof Chart) {
  1440. if (console.log("init_charts"), Chart.defaults.global.legend = {
  1441. enabled: !1
  1442. }, $("#canvas_line").length) {
  1443. new Chart(document.getElementById("canvas_line"), {
  1444. type: "line",
  1445. data: {
  1446. labels: ["January", "February", "March", "April", "May", "June", "July"],
  1447. datasets: [{
  1448. label: "My First dataset",
  1449. backgroundColor: "rgba(38, 185, 154, 0.31)",
  1450. borderColor: "rgba(38, 185, 154, 0.7)",
  1451. pointBorderColor: "rgba(38, 185, 154, 0.7)",
  1452. pointBackgroundColor: "rgba(38, 185, 154, 0.7)",
  1453. pointHoverBackgroundColor: "#fff",
  1454. pointHoverBorderColor: "rgba(220,220,220,1)",
  1455. pointBorderWidth: 1,
  1456. data: [31, 74, 6, 39, 20, 85, 7]
  1457. }, {
  1458. label: "My Second dataset",
  1459. backgroundColor: "rgba(3, 88, 106, 0.3)",
  1460. borderColor: "rgba(3, 88, 106, 0.70)",
  1461. pointBorderColor: "rgba(3, 88, 106, 0.70)",
  1462. pointBackgroundColor: "rgba(3, 88, 106, 0.70)",
  1463. pointHoverBackgroundColor: "#fff",
  1464. pointHoverBorderColor: "rgba(151,187,205,1)",
  1465. pointBorderWidth: 1,
  1466. data: [82, 23, 66, 9, 99, 4, 2]
  1467. }]
  1468. }
  1469. })
  1470. }
  1471. if ($("#canvas_line1").length) {
  1472. new Chart(document.getElementById("canvas_line1"), {
  1473. type: "line",
  1474. data: {
  1475. labels: ["January", "February", "March", "April", "May", "June", "July"],
  1476. datasets: [{
  1477. label: "My First dataset",
  1478. backgroundColor: "rgba(38, 185, 154, 0.31)",
  1479. borderColor: "rgba(38, 185, 154, 0.7)",
  1480. pointBorderColor: "rgba(38, 185, 154, 0.7)",
  1481. pointBackgroundColor: "rgba(38, 185, 154, 0.7)",
  1482. pointHoverBackgroundColor: "#fff",
  1483. pointHoverBorderColor: "rgba(220,220,220,1)",
  1484. pointBorderWidth: 1,
  1485. data: [31, 74, 6, 39, 20, 85, 7]
  1486. }, {
  1487. label: "My Second dataset",
  1488. backgroundColor: "rgba(3, 88, 106, 0.3)",
  1489. borderColor: "rgba(3, 88, 106, 0.70)",
  1490. pointBorderColor: "rgba(3, 88, 106, 0.70)",
  1491. pointBackgroundColor: "rgba(3, 88, 106, 0.70)",
  1492. pointHoverBackgroundColor: "#fff",
  1493. pointHoverBorderColor: "rgba(151,187,205,1)",
  1494. pointBorderWidth: 1,
  1495. data: [82, 23, 66, 9, 99, 4, 2]
  1496. }]
  1497. }
  1498. })
  1499. }
  1500. if ($("#canvas_line2").length) {
  1501. new Chart(document.getElementById("canvas_line2"), {
  1502. type: "line",
  1503. data: {
  1504. labels: ["January", "February", "March", "April", "May", "June", "July"],
  1505. datasets: [{
  1506. label: "My First dataset",
  1507. backgroundColor: "rgba(38, 185, 154, 0.31)",
  1508. borderColor: "rgba(38, 185, 154, 0.7)",
  1509. pointBorderColor: "rgba(38, 185, 154, 0.7)",
  1510. pointBackgroundColor: "rgba(38, 185, 154, 0.7)",
  1511. pointHoverBackgroundColor: "#fff",
  1512. pointHoverBorderColor: "rgba(220,220,220,1)",
  1513. pointBorderWidth: 1,
  1514. data: [31, 74, 6, 39, 20, 85, 7]
  1515. }, {
  1516. label: "My Second dataset",
  1517. backgroundColor: "rgba(3, 88, 106, 0.3)",
  1518. borderColor: "rgba(3, 88, 106, 0.70)",
  1519. pointBorderColor: "rgba(3, 88, 106, 0.70)",
  1520. pointBackgroundColor: "rgba(3, 88, 106, 0.70)",
  1521. pointHoverBackgroundColor: "#fff",
  1522. pointHoverBorderColor: "rgba(151,187,205,1)",
  1523. pointBorderWidth: 1,
  1524. data: [82, 23, 66, 9, 99, 4, 2]
  1525. }]
  1526. }
  1527. })
  1528. }
  1529. if ($("#canvas_line3").length) {
  1530. new Chart(document.getElementById("canvas_line3"), {
  1531. type: "line",
  1532. data: {
  1533. labels: ["January", "February", "March", "April", "May", "June", "July"],
  1534. datasets: [{
  1535. label: "My First dataset",
  1536. backgroundColor: "rgba(38, 185, 154, 0.31)",
  1537. borderColor: "rgba(38, 185, 154, 0.7)",
  1538. pointBorderColor: "rgba(38, 185, 154, 0.7)",
  1539. pointBackgroundColor: "rgba(38, 185, 154, 0.7)",
  1540. pointHoverBackgroundColor: "#fff",
  1541. pointHoverBorderColor: "rgba(220,220,220,1)",
  1542. pointBorderWidth: 1,
  1543. data: [31, 74, 6, 39, 20, 85, 7]
  1544. }, {
  1545. label: "My Second dataset",
  1546. backgroundColor: "rgba(3, 88, 106, 0.3)",
  1547. borderColor: "rgba(3, 88, 106, 0.70)",
  1548. pointBorderColor: "rgba(3, 88, 106, 0.70)",
  1549. pointBackgroundColor: "rgba(3, 88, 106, 0.70)",
  1550. pointHoverBackgroundColor: "#fff",
  1551. pointHoverBorderColor: "rgba(151,187,205,1)",
  1552. pointBorderWidth: 1,
  1553. data: [82, 23, 66, 9, 99, 4, 2]
  1554. }]
  1555. }
  1556. })
  1557. }
  1558. if ($("#canvas_line4").length) {
  1559. new Chart(document.getElementById("canvas_line4"), {
  1560. type: "line",
  1561. data: {
  1562. labels: ["January", "February", "March", "April", "May", "June", "July"],
  1563. datasets: [{
  1564. label: "My First dataset",
  1565. backgroundColor: "rgba(38, 185, 154, 0.31)",
  1566. borderColor: "rgba(38, 185, 154, 0.7)",
  1567. pointBorderColor: "rgba(38, 185, 154, 0.7)",
  1568. pointBackgroundColor: "rgba(38, 185, 154, 0.7)",
  1569. pointHoverBackgroundColor: "#fff",
  1570. pointHoverBorderColor: "rgba(220,220,220,1)",
  1571. pointBorderWidth: 1,
  1572. data: [31, 74, 6, 39, 20, 85, 7]
  1573. }, {
  1574. label: "My Second dataset",
  1575. backgroundColor: "rgba(3, 88, 106, 0.3)",
  1576. borderColor: "rgba(3, 88, 106, 0.70)",
  1577. pointBorderColor: "rgba(3, 88, 106, 0.70)",
  1578. pointBackgroundColor: "rgba(3, 88, 106, 0.70)",
  1579. pointHoverBackgroundColor: "#fff",
  1580. pointHoverBorderColor: "rgba(151,187,205,1)",
  1581. pointBorderWidth: 1,
  1582. data: [82, 23, 66, 9, 99, 4, 2]
  1583. }]
  1584. }
  1585. })
  1586. }
  1587. if ($("#lineChart").length) {
  1588. var f = document.getElementById("lineChart");
  1589. new Chart(f, {
  1590. type: "line",
  1591. data: {
  1592. labels: ["January", "February", "March", "April", "May", "June", "July"],
  1593. datasets: [{
  1594. label: "My First dataset",
  1595. backgroundColor: "rgba(38, 185, 154, 0.31)",
  1596. borderColor: "rgba(38, 185, 154, 0.7)",
  1597. pointBorderColor: "rgba(38, 185, 154, 0.7)",
  1598. pointBackgroundColor: "rgba(38, 185, 154, 0.7)",
  1599. pointHoverBackgroundColor: "#fff",
  1600. pointHoverBorderColor: "rgba(220,220,220,1)",
  1601. pointBorderWidth: 1,
  1602. data: [31, 74, 6, 39, 20, 85, 7]
  1603. }, {
  1604. label: "My Second dataset",
  1605. backgroundColor: "rgba(3, 88, 106, 0.3)",
  1606. borderColor: "rgba(3, 88, 106, 0.70)",
  1607. pointBorderColor: "rgba(3, 88, 106, 0.70)",
  1608. pointBackgroundColor: "rgba(3, 88, 106, 0.70)",
  1609. pointHoverBackgroundColor: "#fff",
  1610. pointHoverBorderColor: "rgba(151,187,205,1)",
  1611. pointBorderWidth: 1,
  1612. data: [82, 23, 66, 9, 99, 4, 2]
  1613. }]
  1614. }
  1615. })
  1616. }
  1617. if ($("#mybarChart").length) {
  1618. var f = document.getElementById("mybarChart");
  1619. new Chart(f, {
  1620. type: "bar",
  1621. data: {
  1622. labels: ["January", "February", "March", "April", "May", "June", "July"],
  1623. datasets: [{
  1624. label: "# of Votes",
  1625. backgroundColor: "#26B99A",
  1626. data: [51, 30, 40, 28, 92, 50, 45]
  1627. }, {
  1628. label: "# of Votes",
  1629. backgroundColor: "#03586A",
  1630. data: [41, 56, 25, 48, 72, 34, 12]
  1631. }]
  1632. },
  1633. options: {
  1634. scales: {
  1635. yAxes: [{
  1636. ticks: {
  1637. beginAtZero: !0
  1638. }
  1639. }]
  1640. }
  1641. }
  1642. })
  1643. }
  1644. if ($("#canvasDoughnut").length) {
  1645. var f = document.getElementById("canvasDoughnut"),
  1646. i = {
  1647. labels: ["Dark Grey", "Purple Color", "Gray Color", "Green Color", "Blue Color"],
  1648. datasets: [{
  1649. data: [120, 50, 140, 180, 100],
  1650. backgroundColor: ["#455C73", "#9B59B6", "#BDC3C7", "#26B99A", "#3498DB"],
  1651. hoverBackgroundColor: ["#34495E", "#B370CF", "#CFD4D8", "#36CAAB", "#49A9EA"]
  1652. }]
  1653. };
  1654. new Chart(f, {
  1655. type: "doughnut",
  1656. tooltipFillColor: "rgba(51, 51, 51, 0.55)",
  1657. data: i
  1658. })
  1659. }
  1660. if ($("#canvasRadar").length) {
  1661. var f = document.getElementById("canvasRadar"),
  1662. i = {
  1663. labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],
  1664. datasets: [{
  1665. label: "My First dataset",
  1666. backgroundColor: "rgba(3, 88, 106, 0.2)",
  1667. borderColor: "rgba(3, 88, 106, 0.80)",
  1668. pointBorderColor: "rgba(3, 88, 106, 0.80)",
  1669. pointBackgroundColor: "rgba(3, 88, 106, 0.80)",
  1670. pointHoverBackgroundColor: "#fff",
  1671. pointHoverBorderColor: "rgba(220,220,220,1)",
  1672. data: [65, 59, 90, 81, 56, 55, 40]
  1673. }, {
  1674. label: "My Second dataset",
  1675. backgroundColor: "rgba(38, 185, 154, 0.2)",
  1676. borderColor: "rgba(38, 185, 154, 0.85)",
  1677. pointColor: "rgba(38, 185, 154, 0.85)",
  1678. pointStrokeColor: "#fff",
  1679. pointHighlightFill: "#fff",
  1680. pointHighlightStroke: "rgba(151,187,205,1)",
  1681. data: [28, 48, 40, 19, 96, 27, 100]
  1682. }]
  1683. };
  1684. new Chart(f, {
  1685. type: "radar",
  1686. data: i
  1687. })
  1688. }
  1689. if ($("#pieChart").length) {
  1690. var f = document.getElementById("pieChart"),
  1691. i = {
  1692. datasets: [{
  1693. data: [120, 50, 140, 180, 100],
  1694. backgroundColor: ["#455C73", "#9B59B6", "#BDC3C7", "#26B99A", "#3498DB"],
  1695. label: "My dataset"
  1696. }],
  1697. labels: ["Dark Gray", "Purple", "Gray", "Green", "Blue"]
  1698. };
  1699. new Chart(f, {
  1700. data: i,
  1701. type: "pie",
  1702. otpions: {
  1703. legend: !1
  1704. }
  1705. })
  1706. }
  1707. if ($("#polarArea").length) {
  1708. var f = document.getElementById("polarArea"),
  1709. i = {
  1710. datasets: [{
  1711. data: [120, 50, 140, 180, 100],
  1712. backgroundColor: ["#455C73", "#9B59B6", "#BDC3C7", "#26B99A", "#3498DB"],
  1713. label: "My dataset"
  1714. }],
  1715. labels: ["Dark Gray", "Purple", "Gray", "Green", "Blue"]
  1716. };
  1717. new Chart(f, {
  1718. data: i,
  1719. type: "polarArea",
  1720. options: {
  1721. scale: {
  1722. ticks: {
  1723. beginAtZero: !0
  1724. }
  1725. }
  1726. }
  1727. })
  1728. }
  1729. }
  1730. }
  1731. function init_compose() {
  1732. "undefined" != typeof $.fn.slideToggle && (console.log("init_compose"), $("#compose, .compose-close").click(function () {
  1733. $(".compose").slideToggle()
  1734. }))
  1735. }
  1736. function init_calendar() {
  1737. if ("undefined" != typeof $.fn.fullCalendar) {
  1738. console.log("init_calendar");
  1739. var e, f, a = new Date,
  1740. b = a.getDate(),
  1741. c = a.getMonth(),
  1742. d = a.getFullYear(),
  1743. g = $("#calendar").fullCalendar({
  1744. header: {
  1745. left: "prev,next today",
  1746. center: "title",
  1747. right: "month,agendaWeek,agendaDay,listMonth"
  1748. },
  1749. selectable: !0,
  1750. selectHelper: !0,
  1751. select: function (a, b, c) {
  1752. $("#fc_create").click(), e = a, ended = b, $(".antosubmit").on("click", function () {
  1753. var a = $("#title").val();
  1754. return b && (ended = b), f = $("#event_type").val(), a && g.fullCalendar("renderEvent", {
  1755. title: a,
  1756. start: e,
  1757. end: b,
  1758. allDay: c
  1759. }, !0), $("#title").val(""), g.fullCalendar("unselect"), $(".antoclose").click(), !1
  1760. })
  1761. },
  1762. eventClick: function (a, b, c) {
  1763. $("#fc_edit").click(), $("#title2").val(a.title), f = $("#event_type").val(), $(".antosubmit2").on("click", function () {
  1764. a.title = $("#title2").val(), g.fullCalendar("updateEvent", a), $(".antoclose2").click()
  1765. }), g.fullCalendar("unselect")
  1766. },
  1767. editable: !0,
  1768. events: [{
  1769. title: "All Day Event",
  1770. start: new Date(d, c, 1)
  1771. }, {
  1772. title: "Long Event",
  1773. start: new Date(d, c, b - 5),
  1774. end: new Date(d, c, b - 2)
  1775. }, {
  1776. title: "Meeting",
  1777. start: new Date(d, c, b, 10, 30),
  1778. allDay: !1
  1779. }, {
  1780. title: "Lunch",
  1781. start: new Date(d, c, b + 14, 12, 0),
  1782. end: new Date(d, c, b, 14, 0),
  1783. allDay: !1
  1784. }, {
  1785. title: "Birthday Party",
  1786. start: new Date(d, c, b + 1, 19, 0),
  1787. end: new Date(d, c, b + 1, 22, 30),
  1788. allDay: !1
  1789. }, {
  1790. title: "Click for Google",
  1791. start: new Date(d, c, 28),
  1792. end: new Date(d, c, 29),
  1793. url: "http://google.com/"
  1794. }]
  1795. })
  1796. }
  1797. }
  1798. function init_DataTables() {
  1799. if (console.log("run_datatables"), "undefined" != typeof $.fn.DataTable) {
  1800. console.log("init_DataTables");
  1801. var a = function () {
  1802. $("#datatable-buttons").length && $("#datatable-buttons").DataTable({
  1803. dom: "Bfrtip",
  1804. buttons: [{
  1805. extend: "copy",
  1806. className: "btn-sm"
  1807. }, {
  1808. extend: "csv",
  1809. className: "btn-sm"
  1810. }, {
  1811. extend: "excel",
  1812. className: "btn-sm"
  1813. }, {
  1814. extend: "pdfHtml5",
  1815. className: "btn-sm"
  1816. }, {
  1817. extend: "print",
  1818. className: "btn-sm"
  1819. }],
  1820. responsive: !0
  1821. })
  1822. };
  1823. TableManageButtons = function () {
  1824. "use strict";
  1825. return {
  1826. init: function () {
  1827. a()
  1828. }
  1829. }
  1830. }(), $("#datatable").dataTable(), $("#datatable-keytable").DataTable({
  1831. keys: !0
  1832. }), $("#datatable-responsive").DataTable(), $("#datatable-scroller").DataTable({
  1833. ajax: "js/datatables/json/scroller-demo.json",
  1834. deferRender: !0,
  1835. scrollY: 380,
  1836. scrollCollapse: !0,
  1837. scroller: !0
  1838. }), $("#datatable-fixed-header").DataTable({
  1839. fixedHeader: !0
  1840. });
  1841. var b = $("#datatable-checkbox");
  1842. b.dataTable({
  1843. order: [
  1844. [1, "asc"]
  1845. ],
  1846. columnDefs: [{
  1847. orderable: !1,
  1848. targets: [0]
  1849. }]
  1850. }), b.on("draw.dt", function () {
  1851. $("checkbox input").iCheck({
  1852. checkboxClass: "icheckbox_flat-green"
  1853. })
  1854. }), TableManageButtons.init()
  1855. }
  1856. //fix for dynamic tables
  1857. setContentHeight();
  1858. }
  1859. function init_morris_charts() {
  1860. "undefined" != typeof Morris && (console.log("init_morris_charts"), $("#graph_bar").length && Morris.Bar({
  1861. element: "graph_bar",
  1862. data: [{
  1863. device: "iPhone 4",
  1864. geekbench: 380
  1865. }, {
  1866. device: "iPhone 4S",
  1867. geekbench: 655
  1868. }, {
  1869. device: "iPhone 3GS",
  1870. geekbench: 275
  1871. }, {
  1872. device: "iPhone 5",
  1873. geekbench: 1571
  1874. }, {
  1875. device: "iPhone 5S",
  1876. geekbench: 655
  1877. }, {
  1878. device: "iPhone 6",
  1879. geekbench: 2154
  1880. }, {
  1881. device: "iPhone 6 Plus",
  1882. geekbench: 1144
  1883. }, {
  1884. device: "iPhone 6S",
  1885. geekbench: 2371
  1886. }, {
  1887. device: "iPhone 6S Plus",
  1888. geekbench: 1471
  1889. }, {
  1890. device: "Other",
  1891. geekbench: 1371
  1892. }],
  1893. xkey: "device",
  1894. ykeys: ["geekbench"],
  1895. labels: ["Geekbench"],
  1896. barRatio: .4,
  1897. barColors: ["#26B99A", "#34495E", "#ACADAC", "#3498DB"],
  1898. xLabelAngle: 35,
  1899. hideHover: "auto",
  1900. resize: !0
  1901. }), $("#graph_bar_group").length && Morris.Bar({
  1902. element: "graph_bar_group",
  1903. data: [{
  1904. period: "2016-10-01",
  1905. licensed: 807,
  1906. sorned: 660
  1907. }, {
  1908. period: "2016-09-30",
  1909. licensed: 1251,
  1910. sorned: 729
  1911. }, {
  1912. period: "2016-09-29",
  1913. licensed: 1769,
  1914. sorned: 1018
  1915. }, {
  1916. period: "2016-09-20",
  1917. licensed: 2246,
  1918. sorned: 1461
  1919. }, {
  1920. period: "2016-09-19",
  1921. licensed: 2657,
  1922. sorned: 1967
  1923. }, {
  1924. period: "2016-09-18",
  1925. licensed: 3148,
  1926. sorned: 2627
  1927. }, {
  1928. period: "2016-09-17",
  1929. licensed: 3471,
  1930. sorned: 3740
  1931. }, {
  1932. period: "2016-09-16",
  1933. licensed: 2871,
  1934. sorned: 2216
  1935. }, {
  1936. period: "2016-09-15",
  1937. licensed: 2401,
  1938. sorned: 1656
  1939. }, {
  1940. period: "2016-09-10",
  1941. licensed: 2115,
  1942. sorned: 1022
  1943. }],
  1944. xkey: "period",
  1945. barColors: ["#26B99A", "#34495E", "#ACADAC", "#3498DB"],
  1946. ykeys: ["licensed", "sorned"],
  1947. labels: ["Licensed", "SORN"],
  1948. hideHover: "auto",
  1949. xLabelAngle: 60,
  1950. resize: !0
  1951. }), $("#graphx").length && Morris.Bar({
  1952. element: "graphx",
  1953. data: [{
  1954. x: "2015 Q1",
  1955. y: 2,
  1956. z: 3,
  1957. a: 4
  1958. }, {
  1959. x: "2015 Q2",
  1960. y: 3,
  1961. z: 5,
  1962. a: 6
  1963. }, {
  1964. x: "2015 Q3",
  1965. y: 4,
  1966. z: 3,
  1967. a: 2
  1968. }, {
  1969. x: "2015 Q4",
  1970. y: 2,
  1971. z: 4,
  1972. a: 5
  1973. }],
  1974. xkey: "x",
  1975. ykeys: ["y", "z", "a"],
  1976. barColors: ["#26B99A", "#34495E", "#ACADAC", "#3498DB"],
  1977. hideHover: "auto",
  1978. labels: ["Y", "Z", "A"],
  1979. resize: !0
  1980. }).on("click", function (a, b) {
  1981. console.log(a, b)
  1982. }), $("#graph_area").length && Morris.Area({
  1983. element: "graph_area",
  1984. data: [{
  1985. period: "2014 Q1",
  1986. iphone: 2666,
  1987. ipad: null,
  1988. itouch: 2647
  1989. }, {
  1990. period: "2014 Q2",
  1991. iphone: 2778,
  1992. ipad: 2294,
  1993. itouch: 2441
  1994. }, {
  1995. period: "2014 Q3",
  1996. iphone: 4912,
  1997. ipad: 1969,
  1998. itouch: 2501
  1999. }, {
  2000. period: "2014 Q4",
  2001. iphone: 3767,
  2002. ipad: 3597,
  2003. itouch: 5689
  2004. }, {
  2005. period: "2015 Q1",
  2006. iphone: 6810,
  2007. ipad: 1914,
  2008. itouch: 2293
  2009. }, {
  2010. period: "2015 Q2",
  2011. iphone: 5670,
  2012. ipad: 4293,
  2013. itouch: 1881
  2014. }, {
  2015. period: "2015 Q3",
  2016. iphone: 4820,
  2017. ipad: 3795,
  2018. itouch: 1588
  2019. }, {
  2020. period: "2015 Q4",
  2021. iphone: 15073,
  2022. ipad: 5967,
  2023. itouch: 5175
  2024. }, {
  2025. period: "2016 Q1",
  2026. iphone: 10687,
  2027. ipad: 4460,
  2028. itouch: 2028
  2029. }, {
  2030. period: "2016 Q2",
  2031. iphone: 8432,
  2032. ipad: 5713,
  2033. itouch: 1791
  2034. }],
  2035. xkey: "period",
  2036. ykeys: ["iphone", "ipad", "itouch"],
  2037. lineColors: ["#26B99A", "#34495E", "#ACADAC", "#3498DB"],
  2038. labels: ["iPhone", "iPad", "iPod Touch"],
  2039. pointSize: 2,
  2040. hideHover: "auto",
  2041. resize: !0
  2042. }), $("#graph_donut").length && Morris.Donut({
  2043. element: "graph_donut",
  2044. data: [{
  2045. label: "Jam",
  2046. value: 25
  2047. }, {
  2048. label: "Frosted",
  2049. value: 40
  2050. }, {
  2051. label: "Custard",
  2052. value: 25
  2053. }, {
  2054. label: "Sugar",
  2055. value: 10
  2056. }],
  2057. colors: ["#26B99A", "#34495E", "#ACADAC", "#3498DB"],
  2058. formatter: function (a) {
  2059. return a + "%"
  2060. },
  2061. resize: !0
  2062. }), $("#graph_line").length && (Morris.Line({
  2063. element: "graph_line",
  2064. xkey: "year",
  2065. ykeys: ["value"],
  2066. labels: ["Value"],
  2067. hideHover: "auto",
  2068. lineColors: ["#26B99A", "#34495E", "#ACADAC", "#3498DB"],
  2069. data: [{
  2070. year: "2012",
  2071. value: 20
  2072. }, {
  2073. year: "2013",
  2074. value: 10
  2075. }, {
  2076. year: "2014",
  2077. value: 5
  2078. }, {
  2079. year: "2015",
  2080. value: 5
  2081. }, {
  2082. year: "2016",
  2083. value: 20
  2084. }],
  2085. resize: !0
  2086. }), $MENU_TOGGLE.on("click", function () {
  2087. $(window).resize()
  2088. })))
  2089. }
  2090. function init_echarts() {
  2091. if ("undefined" != typeof echarts) {
  2092. console.log("init_echarts");
  2093. var a = {
  2094. color: ["#26B99A", "#34495E", "#BDC3C7", "#3498DB", "#9B59B6", "#8abb6f", "#759c6a", "#bfd3b7"],
  2095. title: {
  2096. itemGap: 8,
  2097. textStyle: {
  2098. fontWeight: "normal",
  2099. color: "#408829"
  2100. }
  2101. },
  2102. dataRange: {
  2103. color: ["#1f610a", "#97b58d"]
  2104. },
  2105. toolbox: {
  2106. color: ["#408829", "#408829", "#408829", "#408829"]
  2107. },
  2108. tooltip: {
  2109. backgroundColor: "rgba(0,0,0,0.5)",
  2110. axisPointer: {
  2111. type: "line",
  2112. lineStyle: {
  2113. color: "#408829",
  2114. type: "dashed"
  2115. },
  2116. crossStyle: {
  2117. color: "#408829"
  2118. },
  2119. shadowStyle: {
  2120. color: "rgba(200,200,200,0.3)"
  2121. }
  2122. }
  2123. },
  2124. dataZoom: {
  2125. dataBackgroundColor: "#eee",
  2126. fillerColor: "rgba(64,136,41,0.2)",
  2127. handleColor: "#408829"
  2128. },
  2129. grid: {
  2130. borderWidth: 0
  2131. },
  2132. categoryAxis: {
  2133. axisLine: {
  2134. lineStyle: {
  2135. color: "#408829"
  2136. }
  2137. },
  2138. splitLine: {
  2139. lineStyle: {
  2140. color: ["#eee"]
  2141. }
  2142. }
  2143. },
  2144. valueAxis: {
  2145. axisLine: {
  2146. lineStyle: {
  2147. color: "#408829"
  2148. }
  2149. },
  2150. splitArea: {
  2151. show: !0,
  2152. areaStyle: {
  2153. color: ["rgba(250,250,250,0.1)", "rgba(200,200,200,0.1)"]
  2154. }
  2155. },
  2156. splitLine: {
  2157. lineStyle: {
  2158. color: ["#eee"]
  2159. }
  2160. }
  2161. },
  2162. timeline: {
  2163. lineStyle: {
  2164. color: "#408829"
  2165. },
  2166. controlStyle: {
  2167. normal: {
  2168. color: "#408829"
  2169. },
  2170. emphasis: {
  2171. color: "#408829"
  2172. }
  2173. }
  2174. },
  2175. k: {
  2176. itemStyle: {
  2177. normal: {
  2178. color: "#68a54a",
  2179. color0: "#a9cba2",
  2180. lineStyle: {
  2181. width: 1,
  2182. color: "#408829",
  2183. color0: "#86b379"
  2184. }
  2185. }
  2186. }
  2187. },
  2188. map: {
  2189. itemStyle: {
  2190. normal: {
  2191. areaStyle: {
  2192. color: "#ddd"
  2193. },
  2194. label: {
  2195. textStyle: {
  2196. color: "#c12e34"
  2197. }
  2198. }
  2199. },
  2200. emphasis: {
  2201. areaStyle: {
  2202. color: "#99d2dd"
  2203. },
  2204. label: {
  2205. textStyle: {
  2206. color: "#c12e34"
  2207. }
  2208. }
  2209. }
  2210. }
  2211. },
  2212. force: {
  2213. itemStyle: {
  2214. normal: {
  2215. linkStyle: {
  2216. strokeColor: "#408829"
  2217. }
  2218. }
  2219. }
  2220. },
  2221. chord: {
  2222. padding: 4,
  2223. itemStyle: {
  2224. normal: {
  2225. lineStyle: {
  2226. width: 1,
  2227. color: "rgba(128, 128, 128, 0.5)"
  2228. },
  2229. chordStyle: {
  2230. lineStyle: {
  2231. width: 1,
  2232. color: "rgba(128, 128, 128, 0.5)"
  2233. }
  2234. }
  2235. },
  2236. emphasis: {
  2237. lineStyle: {
  2238. width: 1,
  2239. color: "rgba(128, 128, 128, 0.5)"
  2240. },
  2241. chordStyle: {
  2242. lineStyle: {
  2243. width: 1,
  2244. color: "rgba(128, 128, 128, 0.5)"
  2245. }
  2246. }
  2247. }
  2248. }
  2249. },
  2250. gauge: {
  2251. startAngle: 225,
  2252. endAngle: -45,
  2253. axisLine: {
  2254. show: !0,
  2255. lineStyle: {
  2256. color: [
  2257. [.2, "#86b379"],
  2258. [.8, "#68a54a"],
  2259. [1, "#408829"]
  2260. ],
  2261. width: 8
  2262. }
  2263. },
  2264. axisTick: {
  2265. splitNumber: 10,
  2266. length: 12,
  2267. lineStyle: {
  2268. color: "auto"
  2269. }
  2270. },
  2271. axisLabel: {
  2272. textStyle: {
  2273. color: "auto"
  2274. }
  2275. },
  2276. splitLine: {
  2277. length: 18,
  2278. lineStyle: {
  2279. color: "auto"
  2280. }
  2281. },
  2282. pointer: {
  2283. length: "90%",
  2284. color: "auto"
  2285. },
  2286. title: {
  2287. textStyle: {
  2288. color: "#333"
  2289. }
  2290. },
  2291. detail: {
  2292. textStyle: {
  2293. color: "auto"
  2294. }
  2295. }
  2296. },
  2297. textStyle: {
  2298. fontFamily: "Arial, Verdana, sans-serif"
  2299. }
  2300. };
  2301. if ($("#mainb").length) {
  2302. var b = echarts.init(document.getElementById("mainb"), a);
  2303. b.setOption({
  2304. title: {
  2305. text: "Graph title",
  2306. subtext: "Graph Sub-text"
  2307. },
  2308. tooltip: {
  2309. trigger: "axis"
  2310. },
  2311. legend: {
  2312. data: ["sales", "purchases"]
  2313. },
  2314. toolbox: {
  2315. show: !1
  2316. },
  2317. calculable: !1,
  2318. xAxis: [{
  2319. type: "category",
  2320. data: ["1?", "2?", "3?", "4?", "5?", "6?", "7?", "8?", "9?", "10?", "11?", "12?"]
  2321. }],
  2322. yAxis: [{
  2323. type: "value"
  2324. }],
  2325. series: [{
  2326. name: "sales",
  2327. type: "bar",
  2328. data: [2, 4.9, 7, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20, 6.4, 3.3],
  2329. markPoint: {
  2330. data: [{
  2331. type: "max",
  2332. name: "???"
  2333. }, {
  2334. type: "min",
  2335. name: "???"
  2336. }]
  2337. },
  2338. markLine: {
  2339. data: [{
  2340. type: "average",
  2341. name: "???"
  2342. }]
  2343. }
  2344. }, {
  2345. name: "purchases",
  2346. type: "bar",
  2347. data: [2.6, 5.9, 9, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6, 2.3],
  2348. markPoint: {
  2349. data: [{
  2350. name: "sales",
  2351. value: 182.2,
  2352. xAxis: 7,
  2353. yAxis: 183
  2354. }, {
  2355. name: "purchases",
  2356. value: 2.3,
  2357. xAxis: 11,
  2358. yAxis: 3
  2359. }]
  2360. },
  2361. markLine: {
  2362. data: [{
  2363. type: "average",
  2364. name: "???"
  2365. }]
  2366. }
  2367. }]
  2368. })
  2369. }
  2370. if ($("#echart_sonar").length) {
  2371. var c = echarts.init(document.getElementById("echart_sonar"), a);
  2372. c.setOption({
  2373. title: {
  2374. text: "Budget vs spending",
  2375. subtext: "Subtitle"
  2376. },
  2377. tooltip: {
  2378. trigger: "item"
  2379. },
  2380. legend: {
  2381. orient: "vertical",
  2382. x: "right",
  2383. y: "bottom",
  2384. data: ["Allocated Budget", "Actual Spending"]
  2385. },
  2386. toolbox: {
  2387. show: !0,
  2388. feature: {
  2389. restore: {
  2390. show: !0,
  2391. title: "Restore"
  2392. },
  2393. saveAsImage: {
  2394. show: !0,
  2395. title: "Save Image"
  2396. }
  2397. }
  2398. },
  2399. polar: [{
  2400. indicator: [{
  2401. text: "Sales",
  2402. max: 6e3
  2403. }, {
  2404. text: "Administration",
  2405. max: 16e3
  2406. }, {
  2407. text: "Information Techology",
  2408. max: 3e4
  2409. }, {
  2410. text: "Customer Support",
  2411. max: 38e3
  2412. }, {
  2413. text: "Development",
  2414. max: 52e3
  2415. }, {
  2416. text: "Marketing",
  2417. max: 25e3
  2418. }]
  2419. }],
  2420. calculable: !0,
  2421. series: [{
  2422. name: "Budget vs spending",
  2423. type: "radar",
  2424. data: [{
  2425. value: [4300, 1e4, 28e3, 35e3, 5e4, 19e3],
  2426. name: "Allocated Budget"
  2427. }, {
  2428. value: [5e3, 14e3, 28e3, 31e3, 42e3, 21e3],
  2429. name: "Actual Spending"
  2430. }]
  2431. }]
  2432. })
  2433. }
  2434. if ($("#echart_pyramid").length) {
  2435. var d = echarts.init(document.getElementById("echart_pyramid"), a);
  2436. d.setOption({
  2437. title: {
  2438. text: "Echart Pyramid Graph",
  2439. subtext: "Subtitle"
  2440. },
  2441. tooltip: {
  2442. trigger: "item",
  2443. formatter: "{a} <br/>{b} : {c}%"
  2444. },
  2445. toolbox: {
  2446. show: !0,
  2447. feature: {
  2448. restore: {
  2449. show: !0,
  2450. title: "Restore"
  2451. },
  2452. saveAsImage: {
  2453. show: !0,
  2454. title: "Save Image"
  2455. }
  2456. }
  2457. },
  2458. legend: {
  2459. data: ["Something #1", "Something #2", "Something #3", "Something #4", "Something #5"],
  2460. orient: "vertical",
  2461. x: "left",
  2462. y: "bottom"
  2463. },
  2464. calculable: !0,
  2465. series: [{
  2466. name: "漏斗图",
  2467. type: "funnel",
  2468. width: "40%",
  2469. data: [{
  2470. value: 60,
  2471. name: "Something #1"
  2472. }, {
  2473. value: 40,
  2474. name: "Something #2"
  2475. }, {
  2476. value: 20,
  2477. name: "Something #3"
  2478. }, {
  2479. value: 80,
  2480. name: "Something #4"
  2481. }, {
  2482. value: 100,
  2483. name: "Something #5"
  2484. }]
  2485. }]
  2486. })
  2487. }
  2488. if ($("#echart_gauge").length) {
  2489. var e = echarts.init(document.getElementById("echart_gauge"), a);
  2490. e.setOption({
  2491. tooltip: {
  2492. formatter: "{a} <br/>{b} : {c}%"
  2493. },
  2494. toolbox: {
  2495. show: !0,
  2496. feature: {
  2497. restore: {
  2498. show: !0,
  2499. title: "Restore"
  2500. },
  2501. saveAsImage: {
  2502. show: !0,
  2503. title: "Save Image"
  2504. }
  2505. }
  2506. },
  2507. series: [{
  2508. name: "Performance",
  2509. type: "gauge",
  2510. center: ["50%", "50%"],
  2511. startAngle: 140,
  2512. endAngle: -140,
  2513. min: 0,
  2514. max: 100,
  2515. precision: 0,
  2516. splitNumber: 10,
  2517. axisLine: {
  2518. show: !0,
  2519. lineStyle: {
  2520. color: [
  2521. [.2, "lightgreen"],
  2522. [.4, "orange"],
  2523. [.8, "skyblue"],
  2524. [1, "#ff4500"]
  2525. ],
  2526. width: 30
  2527. }
  2528. },
  2529. axisTick: {
  2530. show: !0,
  2531. splitNumber: 5,
  2532. length: 8,
  2533. lineStyle: {
  2534. color: "#eee",
  2535. width: 1,
  2536. type: "solid"
  2537. }
  2538. },
  2539. axisLabel: {
  2540. show: !0,
  2541. formatter: function (a) {
  2542. switch (a + "") {
  2543. case "10":
  2544. return "a";
  2545. case "30":
  2546. return "b";
  2547. case "60":
  2548. return "c";
  2549. case "90":
  2550. return "d";
  2551. default:
  2552. return ""
  2553. }
  2554. },
  2555. textStyle: {
  2556. color: "#333"
  2557. }
  2558. },
  2559. splitLine: {
  2560. show: !0,
  2561. length: 30,
  2562. lineStyle: {
  2563. color: "#eee",
  2564. width: 2,
  2565. type: "solid"
  2566. }
  2567. },
  2568. pointer: {
  2569. length: "80%",
  2570. width: 8,
  2571. color: "auto"
  2572. },
  2573. title: {
  2574. show: !0,
  2575. offsetCenter: ["-65%", -10],
  2576. textStyle: {
  2577. color: "#333",
  2578. fontSize: 15
  2579. }
  2580. },
  2581. detail: {
  2582. show: !0,
  2583. backgroundColor: "rgba(0,0,0,0)",
  2584. borderWidth: 0,
  2585. borderColor: "#ccc",
  2586. width: 100,
  2587. height: 40,
  2588. offsetCenter: ["-60%", 10],
  2589. formatter: "{value}%",
  2590. textStyle: {
  2591. color: "auto",
  2592. fontSize: 30
  2593. }
  2594. },
  2595. data: [{
  2596. value: 50,
  2597. name: "Performance"
  2598. }]
  2599. }]
  2600. })
  2601. }
  2602. if ($("#echart_line").length) {
  2603. var f = echarts.init(document.getElementById("echart_line"), a);
  2604. f.setOption({
  2605. title: {
  2606. text: "Line Graph",
  2607. subtext: "Subtitle"
  2608. },
  2609. tooltip: {
  2610. trigger: "axis"
  2611. },
  2612. legend: {
  2613. x: 220,
  2614. y: 40,
  2615. data: ["Intent", "Pre-order", "Deal"]
  2616. },
  2617. toolbox: {
  2618. show: !0,
  2619. feature: {
  2620. magicType: {
  2621. show: !0,
  2622. title: {
  2623. line: "Line",
  2624. bar: "Bar",
  2625. stack: "Stack",
  2626. tiled: "Tiled"
  2627. },
  2628. type: ["line", "bar", "stack", "tiled"]
  2629. },
  2630. restore: {
  2631. show: !0,
  2632. title: "Restore"
  2633. },
  2634. saveAsImage: {
  2635. show: !0,
  2636. title: "Save Image"
  2637. }
  2638. }
  2639. },
  2640. calculable: !0,
  2641. xAxis: [{
  2642. type: "category",
  2643. boundaryGap: !1,
  2644. data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
  2645. }],
  2646. yAxis: [{
  2647. type: "value"
  2648. }],
  2649. series: [{
  2650. name: "Deal",
  2651. type: "line",
  2652. smooth: !0,
  2653. itemStyle: {
  2654. normal: {
  2655. areaStyle: {
  2656. type: "default"
  2657. }
  2658. }
  2659. },
  2660. data: [10, 12, 21, 54, 260, 830, 710]
  2661. }, {
  2662. name: "Pre-order",
  2663. type: "line",
  2664. smooth: !0,
  2665. itemStyle: {
  2666. normal: {
  2667. areaStyle: {
  2668. type: "default"
  2669. }
  2670. }
  2671. },
  2672. data: [30, 182, 434, 791, 390, 30, 10]
  2673. }, {
  2674. name: "Intent",
  2675. type: "line",
  2676. smooth: !0,
  2677. itemStyle: {
  2678. normal: {
  2679. areaStyle: {
  2680. type: "default"
  2681. }
  2682. }
  2683. },
  2684. data: [1320, 1132, 601, 234, 120, 90, 20]
  2685. }]
  2686. })
  2687. }
  2688. if ($("#echart_scatter").length) {
  2689. var g = echarts.init(document.getElementById("echart_scatter"), a);
  2690. g.setOption({
  2691. title: {
  2692. text: "Scatter Graph",
  2693. subtext: "Heinz 2003"
  2694. },
  2695. tooltip: {
  2696. trigger: "axis",
  2697. showDelay: 0,
  2698. axisPointer: {
  2699. type: "cross",
  2700. lineStyle: {
  2701. type: "dashed",
  2702. width: 1
  2703. }
  2704. }
  2705. },
  2706. legend: {
  2707. data: ["Data2", "Data1"]
  2708. },
  2709. toolbox: {
  2710. show: !0,
  2711. feature: {
  2712. saveAsImage: {
  2713. show: !0,
  2714. title: "Save Image"
  2715. }
  2716. }
  2717. },
  2718. xAxis: [{
  2719. type: "value",
  2720. scale: !0,
  2721. axisLabel: {
  2722. formatter: "{value} cm"
  2723. }
  2724. }],
  2725. yAxis: [{
  2726. type: "value",
  2727. scale: !0,
  2728. axisLabel: {
  2729. formatter: "{value} kg"
  2730. }
  2731. }],
  2732. series: [{
  2733. name: "Data1",
  2734. type: "scatter",
  2735. tooltip: {
  2736. trigger: "item",
  2737. formatter: function (a) {
  2738. return a.value.length > 1 ? a.seriesName + " :<br/>" + a.value[0] + "cm " + a.value[1] + "kg " : a.seriesName + " :<br/>" + a.name + " : " + a.value + "kg "
  2739. }
  2740. },
  2741. data: [
  2742. [161.2, 51.6],
  2743. [167.5, 59],
  2744. [159.5, 49.2],
  2745. [157, 63],
  2746. [155.8, 53.6],
  2747. [170, 59],
  2748. [159.1, 47.6],
  2749. [166, 69.8],
  2750. [176.2, 66.8],
  2751. [160.2, 75.2],
  2752. [172.5, 55.2],
  2753. [170.9, 54.2],
  2754. [172.9, 62.5],
  2755. [153.4, 42],
  2756. [160, 50],
  2757. [147.2, 49.8],
  2758. [168.2, 49.2],
  2759. [175, 73.2],
  2760. [157, 47.8],
  2761. [167.6, 68.8],
  2762. [159.5, 50.6],
  2763. [175, 82.5],
  2764. [166.8, 57.2],
  2765. [176.5, 87.8],
  2766. [170.2, 72.8],
  2767. [174, 54.5],
  2768. [173, 59.8],
  2769. [179.9, 67.3],
  2770. [170.5, 67.8],
  2771. [160, 47],
  2772. [154.4, 46.2],
  2773. [162, 55],
  2774. [176.5, 83],
  2775. [160, 54.4],
  2776. [152, 45.8],
  2777. [162.1, 53.6],
  2778. [170, 73.2],
  2779. [160.2, 52.1],
  2780. [161.3, 67.9],
  2781. [166.4, 56.6],
  2782. [168.9, 62.3],
  2783. [163.8, 58.5],
  2784. [167.6, 54.5],
  2785. [160, 50.2],
  2786. [161.3, 60.3],
  2787. [167.6, 58.3],
  2788. [165.1, 56.2],
  2789. [160, 50.2],
  2790. [170, 72.9],
  2791. [157.5, 59.8],
  2792. [167.6, 61],
  2793. [160.7, 69.1],
  2794. [163.2, 55.9],
  2795. [152.4, 46.5],
  2796. [157.5, 54.3],
  2797. [168.3, 54.8],
  2798. [180.3, 60.7],
  2799. [165.5, 60],
  2800. [165, 62],
  2801. [164.5, 60.3],
  2802. [156, 52.7],
  2803. [160, 74.3],
  2804. [163, 62],
  2805. [165.7, 73.1],
  2806. [161, 80],
  2807. [162, 54.7],
  2808. [166, 53.2],
  2809. [174, 75.7],
  2810. [172.7, 61.1],
  2811. [167.6, 55.7],
  2812. [151.1, 48.7],
  2813. [164.5, 52.3],
  2814. [163.5, 50],
  2815. [152, 59.3],
  2816. [169, 62.5],
  2817. [164, 55.7],
  2818. [161.2, 54.8],
  2819. [155, 45.9],
  2820. [170, 70.6],
  2821. [176.2, 67.2],
  2822. [170, 69.4],
  2823. [162.5, 58.2],
  2824. [170.3, 64.8],
  2825. [164.1, 71.6],
  2826. [169.5, 52.8],
  2827. [163.2, 59.8],
  2828. [154.5, 49],
  2829. [159.8, 50],
  2830. [173.2, 69.2],
  2831. [170, 55.9],
  2832. [161.4, 63.4],
  2833. [169, 58.2],
  2834. [166.2, 58.6],
  2835. [159.4, 45.7],
  2836. [162.5, 52.2],
  2837. [159, 48.6],
  2838. [162.8, 57.8],
  2839. [159, 55.6],
  2840. [179.8, 66.8],
  2841. [162.9, 59.4],
  2842. [161, 53.6],
  2843. [151.1, 73.2],
  2844. [168.2, 53.4],
  2845. [168.9, 69],
  2846. [173.2, 58.4],
  2847. [171.8, 56.2],
  2848. [178, 70.6],
  2849. [164.3, 59.8],
  2850. [163, 72],
  2851. [168.5, 65.2],
  2852. [166.8, 56.6],
  2853. [172.7, 105.2],
  2854. [163.5, 51.8],
  2855. [169.4, 63.4],
  2856. [167.8, 59],
  2857. [159.5, 47.6],
  2858. [167.6, 63],
  2859. [161.2, 55.2],
  2860. [160, 45],
  2861. [163.2, 54],
  2862. [162.2, 50.2],
  2863. [161.3, 60.2],
  2864. [149.5, 44.8],
  2865. [157.5, 58.8],
  2866. [163.2, 56.4],
  2867. [172.7, 62],
  2868. [155, 49.2],
  2869. [156.5, 67.2],
  2870. [164, 53.8],
  2871. [160.9, 54.4],
  2872. [162.8, 58],
  2873. [167, 59.8],
  2874. [160, 54.8],
  2875. [160, 43.2],
  2876. [168.9, 60.5],
  2877. [158.2, 46.4],
  2878. [156, 64.4],
  2879. [160, 48.8],
  2880. [167.1, 62.2],
  2881. [158, 55.5],
  2882. [167.6, 57.8],
  2883. [156, 54.6],
  2884. [162.1, 59.2],
  2885. [173.4, 52.7],
  2886. [159.8, 53.2],
  2887. [170.5, 64.5],
  2888. [159.2, 51.8],
  2889. [157.5, 56],
  2890. [161.3, 63.6],
  2891. [162.6, 63.2],
  2892. [160, 59.5],
  2893. [168.9, 56.8],
  2894. [165.1, 64.1],
  2895. [162.6, 50],
  2896. [165.1, 72.3],
  2897. [166.4, 55],
  2898. [160, 55.9],
  2899. [152.4, 60.4],
  2900. [170.2, 69.1],
  2901. [162.6, 84.5],
  2902. [170.2, 55.9],
  2903. [158.8, 55.5],
  2904. [172.7, 69.5],
  2905. [167.6, 76.4],
  2906. [162.6, 61.4],
  2907. [167.6, 65.9],
  2908. [156.2, 58.6],
  2909. [175.2, 66.8],
  2910. [172.1, 56.6],
  2911. [162.6, 58.6],
  2912. [160, 55.9],
  2913. [165.1, 59.1],
  2914. [182.9, 81.8],
  2915. [166.4, 70.7],
  2916. [165.1, 56.8],
  2917. [177.8, 60],
  2918. [165.1, 58.2],
  2919. [175.3, 72.7],
  2920. [154.9, 54.1],
  2921. [158.8, 49.1],
  2922. [172.7, 75.9],
  2923. [168.9, 55],
  2924. [161.3, 57.3],
  2925. [167.6, 55],
  2926. [165.1, 65.5],
  2927. [175.3, 65.5],
  2928. [157.5, 48.6],
  2929. [163.8, 58.6],
  2930. [167.6, 63.6],
  2931. [165.1, 55.2],
  2932. [165.1, 62.7],
  2933. [168.9, 56.6],
  2934. [162.6, 53.9],
  2935. [164.5, 63.2],
  2936. [176.5, 73.6],
  2937. [168.9, 62],
  2938. [175.3, 63.6],
  2939. [159.4, 53.2],
  2940. [160, 53.4],
  2941. [170.2, 55],
  2942. [162.6, 70.5],
  2943. [167.6, 54.5],
  2944. [162.6, 54.5],
  2945. [160.7, 55.9],
  2946. [160, 59],
  2947. [157.5, 63.6],
  2948. [162.6, 54.5],
  2949. [152.4, 47.3],
  2950. [170.2, 67.7],
  2951. [165.1, 80.9],
  2952. [172.7, 70.5],
  2953. [165.1, 60.9],
  2954. [170.2, 63.6],
  2955. [170.2, 54.5],
  2956. [170.2, 59.1],
  2957. [161.3, 70.5],
  2958. [167.6, 52.7],
  2959. [167.6, 62.7],
  2960. [165.1, 86.3],
  2961. [162.6, 66.4],
  2962. [152.4, 67.3],
  2963. [168.9, 63],
  2964. [170.2, 73.6],
  2965. [175.2, 62.3],
  2966. [175.2, 57.7],
  2967. [160, 55.4],
  2968. [165.1, 104.1],
  2969. [174, 55.5],
  2970. [170.2, 77.3],
  2971. [160, 80.5],
  2972. [167.6, 64.5],
  2973. [167.6, 72.3],
  2974. [167.6, 61.4],
  2975. [154.9, 58.2],
  2976. [162.6, 81.8],
  2977. [175.3, 63.6],
  2978. [171.4, 53.4],
  2979. [157.5, 54.5],
  2980. [165.1, 53.6],
  2981. [160, 60],
  2982. [174, 73.6],
  2983. [162.6, 61.4],
  2984. [174, 55.5],
  2985. [162.6, 63.6],
  2986. [161.3, 60.9],
  2987. [156.2, 60],
  2988. [149.9, 46.8],
  2989. [169.5, 57.3],
  2990. [160, 64.1],
  2991. [175.3, 63.6],
  2992. [169.5, 67.3],
  2993. [160, 75.5],
  2994. [172.7, 68.2],
  2995. [162.6, 61.4],
  2996. [157.5, 76.8],
  2997. [176.5, 71.8],
  2998. [164.4, 55.5],
  2999. [160.7, 48.6],
  3000. [174, 66.4],
  3001. [163.8, 67.3]
  3002. ],
  3003. markPoint: {
  3004. data: [{
  3005. type: "max",
  3006. name: "Max"
  3007. }, {
  3008. type: "min",
  3009. name: "Min"
  3010. }]
  3011. },
  3012. markLine: {
  3013. data: [{
  3014. type: "average",
  3015. name: "Mean"
  3016. }]
  3017. }
  3018. }, {
  3019. name: "Data2",
  3020. type: "scatter",
  3021. tooltip: {
  3022. trigger: "item",
  3023. formatter: function (a) {
  3024. return a.value.length > 1 ? a.seriesName + " :<br/>" + a.value[0] + "cm " + a.value[1] + "kg " : a.seriesName + " :<br/>" + a.name + " : " + a.value + "kg "
  3025. }
  3026. },
  3027. data: [
  3028. [174, 65.6],
  3029. [175.3, 71.8],
  3030. [193.5, 80.7],
  3031. [186.5, 72.6],
  3032. [187.2, 78.8],
  3033. [181.5, 74.8],
  3034. [184, 86.4],
  3035. [184.5, 78.4],
  3036. [175, 62],
  3037. [184, 81.6],
  3038. [180, 76.6],
  3039. [177.8, 83.6],
  3040. [192, 90],
  3041. [176, 74.6],
  3042. [174, 71],
  3043. [184, 79.6],
  3044. [192.7, 93.8],
  3045. [171.5, 70],
  3046. [173, 72.4],
  3047. [176, 85.9],
  3048. [176, 78.8],
  3049. [180.5, 77.8],
  3050. [172.7, 66.2],
  3051. [176, 86.4],
  3052. [173.5, 81.8],
  3053. [178, 89.6],
  3054. [180.3, 82.8],
  3055. [180.3, 76.4],
  3056. [164.5, 63.2],
  3057. [173, 60.9],
  3058. [183.5, 74.8],
  3059. [175.5, 70],
  3060. [188, 72.4],
  3061. [189.2, 84.1],
  3062. [172.8, 69.1],
  3063. [170, 59.5],
  3064. [182, 67.2],
  3065. [170, 61.3],
  3066. [177.8, 68.6],
  3067. [184.2, 80.1],
  3068. [186.7, 87.8],
  3069. [171.4, 84.7],
  3070. [172.7, 73.4],
  3071. [175.3, 72.1],
  3072. [180.3, 82.6],
  3073. [182.9, 88.7],
  3074. [188, 84.1],
  3075. [177.2, 94.1],
  3076. [172.1, 74.9],
  3077. [167, 59.1],
  3078. [169.5, 75.6],
  3079. [174, 86.2],
  3080. [172.7, 75.3],
  3081. [182.2, 87.1],
  3082. [164.1, 55.2],
  3083. [163, 57],
  3084. [171.5, 61.4],
  3085. [184.2, 76.8],
  3086. [174, 86.8],
  3087. [174, 72.2],
  3088. [177, 71.6],
  3089. [186, 84.8],
  3090. [167, 68.2],
  3091. [171.8, 66.1],
  3092. [182, 72],
  3093. [167, 64.6],
  3094. [177.8, 74.8],
  3095. [164.5, 70],
  3096. [192, 101.6],
  3097. [175.5, 63.2],
  3098. [171.2, 79.1],
  3099. [181.6, 78.9],
  3100. [167.4, 67.7],
  3101. [181.1, 66],
  3102. [177, 68.2],
  3103. [174.5, 63.9],
  3104. [177.5, 72],
  3105. [170.5, 56.8],
  3106. [182.4, 74.5],
  3107. [197.1, 90.9],
  3108. [180.1, 93],
  3109. [175.5, 80.9],
  3110. [180.6, 72.7],
  3111. [184.4, 68],
  3112. [175.5, 70.9],
  3113. [180.6, 72.5],
  3114. [177, 72.5],
  3115. [177.1, 83.4],
  3116. [181.6, 75.5],
  3117. [176.5, 73],
  3118. [175, 70.2],
  3119. [174, 73.4],
  3120. [165.1, 70.5],
  3121. [177, 68.9],
  3122. [192, 102.3],
  3123. [176.5, 68.4],
  3124. [169.4, 65.9],
  3125. [182.1, 75.7],
  3126. [179.8, 84.5],
  3127. [175.3, 87.7],
  3128. [184.9, 86.4],
  3129. [177.3, 73.2],
  3130. [167.4, 53.9],
  3131. [178.1, 72],
  3132. [168.9, 55.5],
  3133. [157.2, 58.4],
  3134. [180.3, 83.2],
  3135. [170.2, 72.7],
  3136. [177.8, 64.1],
  3137. [172.7, 72.3],
  3138. [165.1, 65],
  3139. [186.7, 86.4],
  3140. [165.1, 65],
  3141. [174, 88.6],
  3142. [175.3, 84.1],
  3143. [185.4, 66.8],
  3144. [177.8, 75.5],
  3145. [180.3, 93.2],
  3146. [180.3, 82.7],
  3147. [177.8, 58],
  3148. [177.8, 79.5],
  3149. [177.8, 78.6],
  3150. [177.8, 71.8],
  3151. [177.8, 116.4],
  3152. [163.8, 72.2],
  3153. [188, 83.6],
  3154. [198.1, 85.5],
  3155. [175.3, 90.9],
  3156. [166.4, 85.9],
  3157. [190.5, 89.1],
  3158. [166.4, 75],
  3159. [177.8, 77.7],
  3160. [179.7, 86.4],
  3161. [172.7, 90.9],
  3162. [190.5, 73.6],
  3163. [185.4, 76.4],
  3164. [168.9, 69.1],
  3165. [167.6, 84.5],
  3166. [175.3, 64.5],
  3167. [170.2, 69.1],
  3168. [190.5, 108.6],
  3169. [177.8, 86.4],
  3170. [190.5, 80.9],
  3171. [177.8, 87.7],
  3172. [184.2, 94.5],
  3173. [176.5, 80.2],
  3174. [177.8, 72],
  3175. [180.3, 71.4],
  3176. [171.4, 72.7],
  3177. [172.7, 84.1],
  3178. [172.7, 76.8],
  3179. [177.8, 63.6],
  3180. [177.8, 80.9],
  3181. [182.9, 80.9],
  3182. [170.2, 85.5],
  3183. [167.6, 68.6],
  3184. [175.3, 67.7],
  3185. [165.1, 66.4],
  3186. [185.4, 102.3],
  3187. [181.6, 70.5],
  3188. [172.7, 95.9],
  3189. [190.5, 84.1],
  3190. [179.1, 87.3],
  3191. [175.3, 71.8],
  3192. [170.2, 65.9],
  3193. [193, 95.9],
  3194. [171.4, 91.4],
  3195. [177.8, 81.8],
  3196. [177.8, 96.8],
  3197. [167.6, 69.1],
  3198. [167.6, 82.7],
  3199. [180.3, 75.5],
  3200. [182.9, 79.5],
  3201. [176.5, 73.6],
  3202. [186.7, 91.8],
  3203. [188, 84.1],
  3204. [188, 85.9],
  3205. [177.8, 81.8],
  3206. [174, 82.5],
  3207. [177.8, 80.5],
  3208. [171.4, 70],
  3209. [185.4, 81.8],
  3210. [185.4, 84.1],
  3211. [188, 90.5],
  3212. [188, 91.4],
  3213. [182.9, 89.1],
  3214. [176.5, 85],
  3215. [175.3, 69.1],
  3216. [175.3, 73.6],
  3217. [188, 80.5],
  3218. [188, 82.7],
  3219. [175.3, 86.4],
  3220. [170.5, 67.7],
  3221. [179.1, 92.7],
  3222. [177.8, 93.6],
  3223. [175.3, 70.9],
  3224. [182.9, 75],
  3225. [170.8, 93.2],
  3226. [188, 93.2],
  3227. [180.3, 77.7],
  3228. [177.8, 61.4],
  3229. [185.4, 94.1],
  3230. [168.9, 75],
  3231. [185.4, 83.6],
  3232. [180.3, 85.5],
  3233. [174, 73.9],
  3234. [167.6, 66.8],
  3235. [182.9, 87.3],
  3236. [160, 72.3],
  3237. [180.3, 88.6],
  3238. [167.6, 75.5],
  3239. [186.7, 101.4],
  3240. [175.3, 91.1],
  3241. [175.3, 67.3],
  3242. [175.9, 77.7],
  3243. [175.3, 81.8],
  3244. [179.1, 75.5],
  3245. [181.6, 84.5],
  3246. [177.8, 76.6],
  3247. [182.9, 85],
  3248. [177.8, 102.5],
  3249. [184.2, 77.3],
  3250. [179.1, 71.8],
  3251. [176.5, 87.9],
  3252. [188, 94.3],
  3253. [174, 70.9],
  3254. [167.6, 64.5],
  3255. [170.2, 77.3],
  3256. [167.6, 72.3],
  3257. [188, 87.3],
  3258. [174, 80],
  3259. [176.5, 82.3],
  3260. [180.3, 73.6],
  3261. [167.6, 74.1],
  3262. [188, 85.9],
  3263. [180.3, 73.2],
  3264. [167.6, 76.3],
  3265. [183, 65.9],
  3266. [183, 90.9],
  3267. [179.1, 89.1],
  3268. [170.2, 62.3],
  3269. [177.8, 82.7],
  3270. [179.1, 79.1],
  3271. [190.5, 98.2],
  3272. [177.8, 84.1],
  3273. [180.3, 83.2],
  3274. [180.3, 83.2]
  3275. ],
  3276. markPoint: {
  3277. data: [{
  3278. type: "max",
  3279. name: "Max"
  3280. }, {
  3281. type: "min",
  3282. name: "Min"
  3283. }]
  3284. },
  3285. markLine: {
  3286. data: [{
  3287. type: "average",
  3288. name: "Mean"
  3289. }]
  3290. }
  3291. }]
  3292. })
  3293. }
  3294. if ($("#echart_bar_horizontal").length) {
  3295. var b = echarts.init(document.getElementById("echart_bar_horizontal"), a);
  3296. b.setOption({
  3297. title: {
  3298. text: "Bar Graph",
  3299. subtext: "Graph subtitle"
  3300. },
  3301. tooltip: {
  3302. trigger: "axis"
  3303. },
  3304. legend: {
  3305. x: 100,
  3306. data: ["2015", "2016"]
  3307. },
  3308. toolbox: {
  3309. show: !0,
  3310. feature: {
  3311. saveAsImage: {
  3312. show: !0,
  3313. title: "Save Image"
  3314. }
  3315. }
  3316. },
  3317. calculable: !0,
  3318. xAxis: [{
  3319. type: "value",
  3320. boundaryGap: [0, .01]
  3321. }],
  3322. yAxis: [{
  3323. type: "category",
  3324. data: ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
  3325. }],
  3326. series: [{
  3327. name: "2015",
  3328. type: "bar",
  3329. data: [18203, 23489, 29034, 104970, 131744, 630230]
  3330. }, {
  3331. name: "2016",
  3332. type: "bar",
  3333. data: [19325, 23438, 31e3, 121594, 134141, 681807]
  3334. }]
  3335. })
  3336. }
  3337. if ($("#echart_pie2").length) {
  3338. var h = echarts.init(document.getElementById("echart_pie2"), a);
  3339. h.setOption({
  3340. tooltip: {
  3341. trigger: "item",
  3342. formatter: "{a} <br/>{b} : {c} ({d}%)"
  3343. },
  3344. legend: {
  3345. x: "center",
  3346. y: "bottom",
  3347. data: ["rose1", "rose2", "rose3", "rose4", "rose5", "rose6"]
  3348. },
  3349. toolbox: {
  3350. show: !0,
  3351. feature: {
  3352. magicType: {
  3353. show: !0,
  3354. type: ["pie", "funnel"]
  3355. },
  3356. restore: {
  3357. show: !0,
  3358. title: "Restore"
  3359. },
  3360. saveAsImage: {
  3361. show: !0,
  3362. title: "Save Image"
  3363. }
  3364. }
  3365. },
  3366. calculable: !0,
  3367. series: [{
  3368. name: "Area Mode",
  3369. type: "pie",
  3370. radius: [25, 90],
  3371. center: ["50%", 170],
  3372. roseType: "area",
  3373. x: "50%",
  3374. max: 40,
  3375. sort: "ascending",
  3376. data: [{
  3377. value: 10,
  3378. name: "rose1"
  3379. }, {
  3380. value: 5,
  3381. name: "rose2"
  3382. }, {
  3383. value: 15,
  3384. name: "rose3"
  3385. }, {
  3386. value: 25,
  3387. name: "rose4"
  3388. }, {
  3389. value: 20,
  3390. name: "rose5"
  3391. }, {
  3392. value: 35,
  3393. name: "rose6"
  3394. }]
  3395. }]
  3396. })
  3397. }
  3398. if ($("#echart_donut").length) {
  3399. var i = echarts.init(document.getElementById("echart_donut"), a);
  3400. i.setOption({
  3401. tooltip: {
  3402. trigger: "item",
  3403. formatter: "{a} <br/>{b} : {c} ({d}%)"
  3404. },
  3405. calculable: !0,
  3406. legend: {
  3407. x: "center",
  3408. y: "bottom",
  3409. data: ["Direct Access", "E-mail Marketing", "Union Ad", "Video Ads", "Search Engine"]
  3410. },
  3411. toolbox: {
  3412. show: !0,
  3413. feature: {
  3414. magicType: {
  3415. show: !0,
  3416. type: ["pie", "funnel"],
  3417. option: {
  3418. funnel: {
  3419. x: "25%",
  3420. width: "50%",
  3421. funnelAlign: "center",
  3422. max: 1548
  3423. }
  3424. }
  3425. },
  3426. restore: {
  3427. show: !0,
  3428. title: "Restore"
  3429. },
  3430. saveAsImage: {
  3431. show: !0,
  3432. title: "Save Image"
  3433. }
  3434. }
  3435. },
  3436. series: [{
  3437. name: "Access to the resource",
  3438. type: "pie",
  3439. radius: ["35%", "55%"],
  3440. itemStyle: {
  3441. normal: {
  3442. label: {
  3443. show: !0
  3444. },
  3445. labelLine: {
  3446. show: !0
  3447. }
  3448. },
  3449. emphasis: {
  3450. label: {
  3451. show: !0,
  3452. position: "center",
  3453. textStyle: {
  3454. fontSize: "14",
  3455. fontWeight: "normal"
  3456. }
  3457. }
  3458. }
  3459. },
  3460. data: [{
  3461. value: 335,
  3462. name: "Direct Access"
  3463. }, {
  3464. value: 310,
  3465. name: "E-mail Marketing"
  3466. }, {
  3467. value: 234,
  3468. name: "Union Ad"
  3469. }, {
  3470. value: 135,
  3471. name: "Video Ads"
  3472. }, {
  3473. value: 1548,
  3474. name: "Search Engine"
  3475. }]
  3476. }]
  3477. })
  3478. }
  3479. if ($("#echart_pie").length) {
  3480. var j = echarts.init(document.getElementById("echart_pie"), a);
  3481. j.setOption({
  3482. tooltip: {
  3483. trigger: "item",
  3484. formatter: "{a} <br/>{b} : {c} ({d}%)"
  3485. },
  3486. legend: {
  3487. x: "center",
  3488. y: "bottom",
  3489. data: ["Direct Access", "E-mail Marketing", "Union Ad", "Video Ads", "Search Engine"]
  3490. },
  3491. toolbox: {
  3492. show: !0,
  3493. feature: {
  3494. magicType: {
  3495. show: !0,
  3496. type: ["pie", "funnel"],
  3497. option: {
  3498. funnel: {
  3499. x: "25%",
  3500. width: "50%",
  3501. funnelAlign: "left",
  3502. max: 1548
  3503. }
  3504. }
  3505. },
  3506. restore: {
  3507. show: !0,
  3508. title: "Restore"
  3509. },
  3510. saveAsImage: {
  3511. show: !0,
  3512. title: "Save Image"
  3513. }
  3514. }
  3515. },
  3516. calculable: !0,
  3517. series: [{
  3518. name: "访问来源",
  3519. type: "pie",
  3520. radius: "55%",
  3521. center: ["50%", "48%"],
  3522. data: [{
  3523. value: 335,
  3524. name: "Direct Access"
  3525. }, {
  3526. value: 310,
  3527. name: "E-mail Marketing"
  3528. }, {
  3529. value: 234,
  3530. name: "Union Ad"
  3531. }, {
  3532. value: 135,
  3533. name: "Video Ads"
  3534. }, {
  3535. value: 1548,
  3536. name: "Search Engine"
  3537. }]
  3538. }]
  3539. });
  3540. var k = {
  3541. normal: {
  3542. label: {
  3543. show: !1
  3544. },
  3545. labelLine: {
  3546. show: !1
  3547. }
  3548. }
  3549. },
  3550. l = {
  3551. normal: {
  3552. color: "rgba(0,0,0,0)",
  3553. label: {
  3554. show: !1
  3555. },
  3556. labelLine: {
  3557. show: !1
  3558. }
  3559. },
  3560. emphasis: {
  3561. color: "rgba(0,0,0,0)"
  3562. }
  3563. }
  3564. }
  3565. if ($("#echart_mini_pie").length) {
  3566. var m = echarts.init(document.getElementById("echart_mini_pie"), a);
  3567. m.setOption({
  3568. title: {
  3569. text: "Chart #2",
  3570. subtext: "From ExcelHome",
  3571. sublink: "http://e.weibo.com/1341556070/AhQXtjbqh",
  3572. x: "center",
  3573. y: "center",
  3574. itemGap: 20,
  3575. textStyle: {
  3576. color: "rgba(30,144,255,0.8)",
  3577. fontFamily: "微软雅黑",
  3578. fontSize: 35,
  3579. fontWeight: "bolder"
  3580. }
  3581. },
  3582. tooltip: {
  3583. show: !0,
  3584. formatter: "{a} <br/>{b} : {c} ({d}%)"
  3585. },
  3586. legend: {
  3587. orient: "vertical",
  3588. x: 170,
  3589. y: 45,
  3590. itemGap: 12,
  3591. data: ["68%Something #1", "29%Something #2", "3%Something #3"]
  3592. },
  3593. toolbox: {
  3594. show: !0,
  3595. feature: {
  3596. mark: {
  3597. show: !0
  3598. },
  3599. dataView: {
  3600. show: !0,
  3601. title: "Text View",
  3602. lang: ["Text View", "Close", "Refresh"],
  3603. readOnly: !1
  3604. },
  3605. restore: {
  3606. show: !0,
  3607. title: "Restore"
  3608. },
  3609. saveAsImage: {
  3610. show: !0,
  3611. title: "Save Image"
  3612. }
  3613. }
  3614. },
  3615. series: [{
  3616. name: "1",
  3617. type: "pie",
  3618. clockWise: !1,
  3619. radius: [105, 130],
  3620. itemStyle: k,
  3621. data: [{
  3622. value: 68,
  3623. name: "68%Something #1"
  3624. }, {
  3625. value: 32,
  3626. name: "invisible",
  3627. itemStyle: l
  3628. }]
  3629. }, {
  3630. name: "2",
  3631. type: "pie",
  3632. clockWise: !1,
  3633. radius: [80, 105],
  3634. itemStyle: k,
  3635. data: [{
  3636. value: 29,
  3637. name: "29%Something #2"
  3638. }, {
  3639. value: 71,
  3640. name: "invisible",
  3641. itemStyle: l
  3642. }]
  3643. }, {
  3644. name: "3",
  3645. type: "pie",
  3646. clockWise: !1,
  3647. radius: [25, 80],
  3648. itemStyle: k,
  3649. data: [{
  3650. value: 3,
  3651. name: "3%Something #3"
  3652. }, {
  3653. value: 97,
  3654. name: "invisible",
  3655. itemStyle: l
  3656. }]
  3657. }]
  3658. })
  3659. }
  3660. if ($("#echart_world_map").length) {
  3661. var n = echarts.init(document.getElementById("echart_world_map"), a);
  3662. n.setOption({
  3663. title: {
  3664. text: "World Population (2010)",
  3665. subtext: "from United Nations, Total population, both sexes combined, as of 1 July (thousands)",
  3666. x: "center",
  3667. y: "top"
  3668. },
  3669. tooltip: {
  3670. trigger: "item",
  3671. formatter: function (a) {
  3672. var b = (a.value + "").split(".");
  3673. return b = b[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + "." + b[1], a.seriesName + "<br/>" + a.name + " : " + b
  3674. }
  3675. },
  3676. toolbox: {
  3677. show: !0,
  3678. orient: "vertical",
  3679. x: "right",
  3680. y: "center",
  3681. feature: {
  3682. mark: {
  3683. show: !0
  3684. },
  3685. dataView: {
  3686. show: !0,
  3687. title: "Text View",
  3688. lang: ["Text View", "Close", "Refresh"],
  3689. readOnly: !1
  3690. },
  3691. restore: {
  3692. show: !0,
  3693. title: "Restore"
  3694. },
  3695. saveAsImage: {
  3696. show: !0,
  3697. title: "Save Image"
  3698. }
  3699. }
  3700. },
  3701. dataRange: {
  3702. min: 0,
  3703. max: 1e6,
  3704. text: ["High", "Low"],
  3705. realtime: !1,
  3706. calculable: !0,
  3707. color: ["#087E65", "#26B99A", "#CBEAE3"]
  3708. },
  3709. series: [{
  3710. name: "World Population (2010)",
  3711. type: "map",
  3712. mapType: "world",
  3713. roam: !1,
  3714. mapLocation: {
  3715. y: 60
  3716. },
  3717. itemStyle: {
  3718. emphasis: {
  3719. label: {
  3720. show: !0
  3721. }
  3722. }
  3723. },
  3724. data: [{
  3725. name: "Afghanistan",
  3726. value: 28397.812
  3727. }, {
  3728. name: "Angola",
  3729. value: 19549.124
  3730. }, {
  3731. name: "Albania",
  3732. value: 3150.143
  3733. }, {
  3734. name: "United Arab Emirates",
  3735. value: 8441.537
  3736. }, {
  3737. name: "Argentina",
  3738. value: 40374.224
  3739. }, {
  3740. name: "Armenia",
  3741. value: 2963.496
  3742. }, {
  3743. name: "French Southern and Antarctic Lands",
  3744. value: 268.065
  3745. }, {
  3746. name: "Australia",
  3747. value: 22404.488
  3748. }, {
  3749. name: "Austria",
  3750. value: 8401.924
  3751. }, {
  3752. name: "Azerbaijan",
  3753. value: 9094.718
  3754. }, {
  3755. name: "Burundi",
  3756. value: 9232.753
  3757. }, {
  3758. name: "Belgium",
  3759. value: 10941.288
  3760. }, {
  3761. name: "Benin",
  3762. value: 9509.798
  3763. }, {
  3764. name: "Burkina Faso",
  3765. value: 15540.284
  3766. }, {
  3767. name: "Bangladesh",
  3768. value: 151125.475
  3769. }, {
  3770. name: "Bulgaria",
  3771. value: 7389.175
  3772. }, {
  3773. name: "The Bahamas",
  3774. value: 66402.316
  3775. }, {
  3776. name: "Bosnia and Herzegovina",
  3777. value: 3845.929
  3778. }, {
  3779. name: "Belarus",
  3780. value: 9491.07
  3781. }, {
  3782. name: "Belize",
  3783. value: 308.595
  3784. }, {
  3785. name: "Bermuda",
  3786. value: 64.951
  3787. }, {
  3788. name: "Bolivia",
  3789. value: 716.939
  3790. }, {
  3791. name: "Brazil",
  3792. value: 195210.154
  3793. }, {
  3794. name: "Brunei",
  3795. value: 27.223
  3796. }, {
  3797. name: "Bhutan",
  3798. value: 716.939
  3799. }, {
  3800. name: "Botswana",
  3801. value: 1969.341
  3802. }, {
  3803. name: "Central African Republic",
  3804. value: 4349.921
  3805. }, {
  3806. name: "Canada",
  3807. value: 34126.24
  3808. }, {
  3809. name: "Switzerland",
  3810. value: 7830.534
  3811. }, {
  3812. name: "Chile",
  3813. value: 17150.76
  3814. }, {
  3815. name: "China",
  3816. value: 1359821.465
  3817. }, {
  3818. name: "Ivory Coast",
  3819. value: 60508.978
  3820. }, {
  3821. name: "Cameroon",
  3822. value: 20624.343
  3823. }, {
  3824. name: "Democratic Republic of the Congo",
  3825. value: 62191.161
  3826. }, {
  3827. name: "Republic of the Congo",
  3828. value: 3573.024
  3829. }, {
  3830. name: "Colombia",
  3831. value: 46444.798
  3832. }, {
  3833. name: "Costa Rica",
  3834. value: 4669.685
  3835. }, {
  3836. name: "Cuba",
  3837. value: 11281.768
  3838. }, {
  3839. name: "Northern Cyprus",
  3840. value: 1.468
  3841. }, {
  3842. name: "Cyprus",
  3843. value: 1103.685
  3844. }, {
  3845. name: "Czech Republic",
  3846. value: 10553.701
  3847. }, {
  3848. name: "Germany",
  3849. value: 83017.404
  3850. }, {
  3851. name: "Djibouti",
  3852. value: 834.036
  3853. }, {
  3854. name: "Denmark",
  3855. value: 5550.959
  3856. }, {
  3857. name: "Dominican Republic",
  3858. value: 10016.797
  3859. }, {
  3860. name: "Algeria",
  3861. value: 37062.82
  3862. }, {
  3863. name: "Ecuador",
  3864. value: 15001.072
  3865. }, {
  3866. name: "Egypt",
  3867. value: 78075.705
  3868. }, {
  3869. name: "Eritrea",
  3870. value: 5741.159
  3871. }, {
  3872. name: "Spain",
  3873. value: 46182.038
  3874. }, {
  3875. name: "Estonia",
  3876. value: 1298.533
  3877. }, {
  3878. name: "Ethiopia",
  3879. value: 87095.281
  3880. }, {
  3881. name: "Finland",
  3882. value: 5367.693
  3883. }, {
  3884. name: "Fiji",
  3885. value: 860.559
  3886. }, {
  3887. name: "Falkland Islands",
  3888. value: 49.581
  3889. }, {
  3890. name: "France",
  3891. value: 63230.866
  3892. }, {
  3893. name: "Gabon",
  3894. value: 1556.222
  3895. }, {
  3896. name: "United Kingdom",
  3897. value: 62066.35
  3898. }, {
  3899. name: "Georgia",
  3900. value: 4388.674
  3901. }, {
  3902. name: "Ghana",
  3903. value: 24262.901
  3904. }, {
  3905. name: "Guinea",
  3906. value: 10876.033
  3907. }, {
  3908. name: "Gambia",
  3909. value: 1680.64
  3910. }, {
  3911. name: "Guinea Bissau",
  3912. value: 10876.033
  3913. }, {
  3914. name: "Equatorial Guinea",
  3915. value: 696.167
  3916. }, {
  3917. name: "Greece",
  3918. value: 11109.999
  3919. }, {
  3920. name: "Greenland",
  3921. value: 56.546
  3922. }, {
  3923. name: "Guatemala",
  3924. value: 14341.576
  3925. }, {
  3926. name: "French Guiana",
  3927. value: 231.169
  3928. }, {
  3929. name: "Guyana",
  3930. value: 786.126
  3931. }, {
  3932. name: "Honduras",
  3933. value: 7621.204
  3934. }, {
  3935. name: "Croatia",
  3936. value: 4338.027
  3937. }, {
  3938. name: "Haiti",
  3939. value: 9896.4
  3940. }, {
  3941. name: "Hungary",
  3942. value: 10014.633
  3943. }, {
  3944. name: "Indonesia",
  3945. value: 240676.485
  3946. }, {
  3947. name: "India",
  3948. value: 1205624.648
  3949. }, {
  3950. name: "Ireland",
  3951. value: 4467.561
  3952. }, {
  3953. name: "Iran",
  3954. value: 240676.485
  3955. }, {
  3956. name: "Iraq",
  3957. value: 30962.38
  3958. }, {
  3959. name: "Iceland",
  3960. value: 318.042
  3961. }, {
  3962. name: "Israel",
  3963. value: 7420.368
  3964. }, {
  3965. name: "Italy",
  3966. value: 60508.978
  3967. }, {
  3968. name: "Jamaica",
  3969. value: 2741.485
  3970. }, {
  3971. name: "Jordan",
  3972. value: 6454.554
  3973. }, {
  3974. name: "Japan",
  3975. value: 127352.833
  3976. }, {
  3977. name: "Kazakhstan",
  3978. value: 15921.127
  3979. }, {
  3980. name: "Kenya",
  3981. value: 40909.194
  3982. }, {
  3983. name: "Kyrgyzstan",
  3984. value: 5334.223
  3985. }, {
  3986. name: "Cambodia",
  3987. value: 14364.931
  3988. }, {
  3989. name: "South Korea",
  3990. value: 51452.352
  3991. }, {
  3992. name: "Kosovo",
  3993. value: 97.743
  3994. }, {
  3995. name: "Kuwait",
  3996. value: 2991.58
  3997. }, {
  3998. name: "Laos",
  3999. value: 6395.713
  4000. }, {
  4001. name: "Lebanon",
  4002. value: 4341.092
  4003. }, {
  4004. name: "Liberia",
  4005. value: 3957.99
  4006. }, {
  4007. name: "Libya",
  4008. value: 6040.612
  4009. }, {
  4010. name: "Sri Lanka",
  4011. value: 20758.779
  4012. }, {
  4013. name: "Lesotho",
  4014. value: 2008.921
  4015. }, {
  4016. name: "Lithuania",
  4017. value: 3068.457
  4018. }, {
  4019. name: "Luxembourg",
  4020. value: 507.885
  4021. }, {
  4022. name: "Latvia",
  4023. value: 2090.519
  4024. }, {
  4025. name: "Morocco",
  4026. value: 31642.36
  4027. }, {
  4028. name: "Moldova",
  4029. value: 103.619
  4030. }, {
  4031. name: "Madagascar",
  4032. value: 21079.532
  4033. }, {
  4034. name: "Mexico",
  4035. value: 117886.404
  4036. }, {
  4037. name: "Macedonia",
  4038. value: 507.885
  4039. }, {
  4040. name: "Mali",
  4041. value: 13985.961
  4042. }, {
  4043. name: "Myanmar",
  4044. value: 51931.231
  4045. }, {
  4046. name: "Montenegro",
  4047. value: 620.078
  4048. }, {
  4049. name: "Mongolia",
  4050. value: 2712.738
  4051. }, {
  4052. name: "Mozambique",
  4053. value: 23967.265
  4054. }, {
  4055. name: "Mauritania",
  4056. value: 3609.42
  4057. }, {
  4058. name: "Malawi",
  4059. value: 15013.694
  4060. }, {
  4061. name: "Malaysia",
  4062. value: 28275.835
  4063. }, {
  4064. name: "Namibia",
  4065. value: 2178.967
  4066. }, {
  4067. name: "New Caledonia",
  4068. value: 246.379
  4069. }, {
  4070. name: "Niger",
  4071. value: 15893.746
  4072. }, {
  4073. name: "Nigeria",
  4074. value: 159707.78
  4075. }, {
  4076. name: "Nicaragua",
  4077. value: 5822.209
  4078. }, {
  4079. name: "Netherlands",
  4080. value: 16615.243
  4081. }, {
  4082. name: "Norway",
  4083. value: 4891.251
  4084. }, {
  4085. name: "Nepal",
  4086. value: 26846.016
  4087. }, {
  4088. name: "New Zealand",
  4089. value: 4368.136
  4090. }, {
  4091. name: "Oman",
  4092. value: 2802.768
  4093. }, {
  4094. name: "Pakistan",
  4095. value: 173149.306
  4096. }, {
  4097. name: "Panama",
  4098. value: 3678.128
  4099. }, {
  4100. name: "Peru",
  4101. value: 29262.83
  4102. }, {
  4103. name: "Philippines",
  4104. value: 93444.322
  4105. }, {
  4106. name: "Papua New Guinea",
  4107. value: 6858.945
  4108. }, {
  4109. name: "Poland",
  4110. value: 38198.754
  4111. }, {
  4112. name: "Puerto Rico",
  4113. value: 3709.671
  4114. }, {
  4115. name: "North Korea",
  4116. value: 1.468
  4117. }, {
  4118. name: "Portugal",
  4119. value: 10589.792
  4120. }, {
  4121. name: "Paraguay",
  4122. value: 6459.721
  4123. }, {
  4124. name: "Qatar",
  4125. value: 1749.713
  4126. }, {
  4127. name: "Romania",
  4128. value: 21861.476
  4129. }, {
  4130. name: "Russia",
  4131. value: 21861.476
  4132. }, {
  4133. name: "Rwanda",
  4134. value: 10836.732
  4135. }, {
  4136. name: "Western Sahara",
  4137. value: 514.648
  4138. }, {
  4139. name: "Saudi Arabia",
  4140. value: 27258.387
  4141. }, {
  4142. name: "Sudan",
  4143. value: 35652.002
  4144. }, {
  4145. name: "South Sudan",
  4146. value: 9940.929
  4147. }, {
  4148. name: "Senegal",
  4149. value: 12950.564
  4150. }, {
  4151. name: "Solomon Islands",
  4152. value: 526.447
  4153. }, {
  4154. name: "Sierra Leone",
  4155. value: 5751.976
  4156. }, {
  4157. name: "El Salvador",
  4158. value: 6218.195
  4159. }, {
  4160. name: "Somaliland",
  4161. value: 9636.173
  4162. }, {
  4163. name: "Somalia",
  4164. value: 9636.173
  4165. }, {
  4166. name: "Republic of Serbia",
  4167. value: 3573.024
  4168. }, {
  4169. name: "Suriname",
  4170. value: 524.96
  4171. }, {
  4172. name: "Slovakia",
  4173. value: 5433.437
  4174. }, {
  4175. name: "Slovenia",
  4176. value: 2054.232
  4177. }, {
  4178. name: "Sweden",
  4179. value: 9382.297
  4180. }, {
  4181. name: "Swaziland",
  4182. value: 1193.148
  4183. }, {
  4184. name: "Syria",
  4185. value: 7830.534
  4186. }, {
  4187. name: "Chad",
  4188. value: 11720.781
  4189. }, {
  4190. name: "Togo",
  4191. value: 6306.014
  4192. }, {
  4193. name: "Thailand",
  4194. value: 66402.316
  4195. }, {
  4196. name: "Tajikistan",
  4197. value: 7627.326
  4198. }, {
  4199. name: "Turkmenistan",
  4200. value: 5041.995
  4201. }, {
  4202. name: "East Timor",
  4203. value: 10016.797
  4204. }, {
  4205. name: "Trinidad and Tobago",
  4206. value: 1328.095
  4207. }, {
  4208. name: "Tunisia",
  4209. value: 10631.83
  4210. }, {
  4211. name: "Turkey",
  4212. value: 72137.546
  4213. }, {
  4214. name: "United Republic of Tanzania",
  4215. value: 44973.33
  4216. }, {
  4217. name: "Uganda",
  4218. value: 33987.213
  4219. }, {
  4220. name: "Ukraine",
  4221. value: 46050.22
  4222. }, {
  4223. name: "Uruguay",
  4224. value: 3371.982
  4225. }, {
  4226. name: "United States of America",
  4227. value: 312247.116
  4228. }, {
  4229. name: "Uzbekistan",
  4230. value: 27769.27
  4231. }, {
  4232. name: "Venezuela",
  4233. value: 236.299
  4234. }, {
  4235. name: "Vietnam",
  4236. value: 89047.397
  4237. }, {
  4238. name: "Vanuatu",
  4239. value: 236.299
  4240. }, {
  4241. name: "West Bank",
  4242. value: 13.565
  4243. }, {
  4244. name: "Yemen",
  4245. value: 22763.008
  4246. }, {
  4247. name: "South Africa",
  4248. value: 51452.352
  4249. }, {
  4250. name: "Zambia",
  4251. value: 13216.985
  4252. }, {
  4253. name: "Zimbabwe",
  4254. value: 13076.978
  4255. }]
  4256. }]
  4257. })
  4258. }
  4259. }
  4260. }
  4261. !function (a, b) {
  4262. var c = function (a, b, c) {
  4263. var d;
  4264. return function () {
  4265. function h() {
  4266. c || a.apply(f, g), d = null
  4267. }
  4268. var f = this,
  4269. g = arguments;
  4270. d ? clearTimeout(d) : c && a.apply(f, g), d = setTimeout(h, b || 100)
  4271. }
  4272. };
  4273. jQuery.fn[b] = function (a) {
  4274. return a ? this.bind("resize", c(a)) : this.trigger(b)
  4275. }
  4276. }(jQuery, "smartresize");
  4277. var CURRENT_URL = window.location.href.split("#")[0].split("?")[0],
  4278. $BODY = $("body"),
  4279. $MENU_TOGGLE = $("#menu_toggle"),
  4280. $SIDEBAR_MENU = $("#sidebar-menu"),
  4281. $SIDEBAR_FOOTER = $(".sidebar-footer"),
  4282. $LEFT_COL = $(".left_col"),
  4283. $RIGHT_COL = $(".right_col"),
  4284. $NAV_MENU = $(".nav_menu"),
  4285. $FOOTER = $("footer"),
  4286. randNum = function () {
  4287. return Math.floor(21 * Math.random()) + 20
  4288. };
  4289. $(document).ready(function () {
  4290. $(".collapse-link").on("click", function () {
  4291. var a = $(this).closest(".x_panel"),
  4292. b = $(this).find("i"),
  4293. c = a.find(".x_content");
  4294. a.attr("style") ? c.slideToggle(200, function () {
  4295. a.removeAttr("style")
  4296. }) : (c.slideToggle(200), a.css("height", "auto")), b.toggleClass("fa-chevron-up fa-chevron-down")
  4297. }), $(".close-link").click(function () {
  4298. var a = $(this).closest(".x_panel");
  4299. a.remove()
  4300. })
  4301. }), $(document).ready(function () {
  4302. $('[data-toggle="tooltip"]').tooltip({
  4303. container: "body"
  4304. })
  4305. }), $(".progress .progress-bar")[0] && $(".progress .progress-bar").progressbar(), $(document).ready(function () {
  4306. if ($(".js-switch")[0]) {
  4307. var a = Array.prototype.slice.call(document.querySelectorAll(".js-switch"));
  4308. a.forEach(function (a) {
  4309. new Switchery(a, {
  4310. color: "#26B99A"
  4311. })
  4312. })
  4313. }
  4314. }), $(document).ready(function () {
  4315. $("input.flat")[0] && $(document).ready(function () {
  4316. $("input.flat").iCheck({
  4317. checkboxClass: "icheckbox_flat-green",
  4318. radioClass: "iradio_flat-green"
  4319. })
  4320. })
  4321. }), $("table input").on("ifChecked", function () {
  4322. checkState = "", $(this).parent().parent().parent().addClass("selected"), countChecked()
  4323. }), $("table input").on("ifUnchecked", function () {
  4324. checkState = "", $(this).parent().parent().parent().removeClass("selected"), countChecked()
  4325. });
  4326. var checkState = "";
  4327. $(".bulk_action input").on("ifChecked", function () {
  4328. checkState = "", $(this).parent().parent().parent().addClass("selected"), countChecked()
  4329. }), $(".bulk_action input").on("ifUnchecked", function () {
  4330. checkState = "", $(this).parent().parent().parent().removeClass("selected"), countChecked()
  4331. }), $(".bulk_action input#check-all").on("ifChecked", function () {
  4332. checkState = "all", countChecked()
  4333. }), $(".bulk_action input#check-all").on("ifUnchecked", function () {
  4334. checkState = "none", countChecked()
  4335. }), $(document).ready(function () {
  4336. $(".expand").on("click", function () {
  4337. $(this).next().slideToggle(200), $expand = $(this).find(">:first-child"), "+" == $expand.text() ? $expand.text("-") : $expand.text("+")
  4338. })
  4339. }), "undefined" != typeof NProgress && ($(document).ready(function () {
  4340. NProgress.start();
  4341. }), $(window).on('load', function () {
  4342. // setTimeout fix for Firefox
  4343. setTimeout(function(){ NProgress.done() },100);
  4344. }));
  4345. var originalLeave = $.fn.popover.Constructor.prototype.leave;
  4346. $.fn.popover.Constructor.prototype.leave = function (a) {
  4347. var c, d,
  4348. b = a instanceof this.constructor ? a : $(a.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type);
  4349. originalLeave.call(this, a), a.currentTarget && (c = $(a.currentTarget).siblings(".popover"), d = b.timeout, c.one("mouseenter", function () {
  4350. clearTimeout(d), c.one("mouseleave", function () {
  4351. $.fn.popover.Constructor.prototype.leave.call(b, b)
  4352. })
  4353. }))
  4354. }, $("body").popover({
  4355. selector: "[data-popover]",
  4356. trigger: "click hover",
  4357. delay: {
  4358. show: 50,
  4359. hide: 400
  4360. }
  4361. }), $(document).ready(function () {
  4362. init_sparklines(),
  4363. init_flot_chart(),
  4364. init_wysiwyg(),
  4365. init_InputMask(),
  4366. init_JQVmap(), init_cropper(),
  4367. init_knob(),
  4368. init_IonRangeSlider(),
  4369. init_ColorPicker(),
  4370. init_TagsInput(),
  4371. init_parsley(),
  4372. init_daterangepicker(),
  4373. init_daterangepicker_right(),
  4374. init_daterangepicker_single_call(),
  4375. init_daterangepicker_reservation(),
  4376. init_SmartWizard(),
  4377. init_EasyPieChart(),
  4378. init_charts(),
  4379. init_echarts(),
  4380. init_morris_charts(),
  4381. init_skycons(),
  4382. init_select2(),
  4383. init_validator(),
  4384. init_DataTables(),
  4385. init_chart_doughnut(),
  4386. init_gauge(),
  4387. init_PNotify(),
  4388. init_starrr(),
  4389. init_calendar(),
  4390. init_compose(),
  4391. init_CustomNotification(),
  4392. init_autosize(),
  4393. init_autocomplete()
  4394. });