1function mwSkinLoader ($el) { 2 $el = _jq($el); 3 4 // Copying loader html from system loader 5 var $sysLoader = jQuery('#systemLoader'); 6 var $html = $sysLoader.html(); 7 8 // And inserting it into target element 9 $el.html($html); 10 11} //FUNC mwSkinLoader 12 13/** //** ----= mwState =----------------------------------------------\**//** \ 14* 15* Sets system to processing/idle state. 16* 17* @param MIXED state 18* bool - TRUE for loading indication, FALSE - idle. 19* string - Status message for idle state (usually operation result) 20* 21* @param MIXED [dialog] 22* bool - FALSE for background (hintbar only). TRUE for common 23* system loading. 24* string - Dialog name, to use for indications. 25* 26* @return bool - Always FALSE. 27* 28\**//** ------------------------------------= by Mr.V!T @ Morad Media Inc. =----/** //**/ 29function mwState (state, dialog) { 30 31 // Since mwState meant to be used with windows and backend - doing nothing if windows are not loaded 32 // Done this way due to while windows are supported, but are not required for basic toolkit 33 if ( typeof(mwWindow) === 'undefined' ) 34 return false; 35 36 // Omited dialog is TRUE 37 if ( !isSet(dialog) ) 38 dialog = true; 39 40 // Flush hint bar test, it's used with hintbar 41 HINT_SAVE = false; 42 43 // Updating system indicator 44 if ( state !== true ) { 45 46 // ---- Setting IDLE state ---- 47 48 jQuery('#hint_bar_status_ready').show(); 49 jQuery('#hint_bar_status_working').hide(); 50 51 // Loader should be hided on this step anyway 52 // In some cases when window was created during loading, loader may miss this 53 // So it does not heart to forcehide 54 55 mwWindow('LoaderWindow').hide(); 56 57 // Updating modal loaders 58 if ( typeof(dialog) == 'string' ) { 59 60 // ---- Custom dialog ---- 61 62 mwWindow(dialog).State(state); 63 64 } else { 65 66 // ---- Common loader and background ---- 67 68 if ( state !== false ) 69 jQuery('#HintPlaceholder').html(state); 70 71 } //IF no dialog 72 73 } else { //IF working 74 75 // ---- Setting WORKING state ---- 76 77 jQuery('#hint_bar_status_ready').hide(); 78 jQuery('#hint_bar_status_working').show(); 79 80 // Updating modal loaders 81 if ( typeof(dialog) == 'string' && mwWindow(dialog).Visible ) { 82 83 // ---- Custom dialog ---- 84 85 mwWindow(dialog).State(state); 86 87 } else if ( dialog ) { //IF dialog set 88 89 // ---- Common loader ---- 90 91 mwWindow('LoaderWindow').show(); 92 93 } //IF common loader 94 95 } //IF idle 96 97 return false; 98 99} //FUNC mwState 100 101/** //** ----= mwExHandle =--------------------------------------------------------------------------------------\**//** \ 102* 103* Morweb global exceptions handler. Basic handlinng for now. This way user can say at least smth. 104* 105* @see window.onerror handler doc for parameters list. 106* 107\**//** ---------------------------------------------------------------------------= by Mr.V!T @ Morad Media Inc. =----/** //**/ 108function mwExHandle (msg, url, lineNo) { 109 110 // ToDo: test compatability 111 // ToDo: Implement class based exceptions logic, 112 // and filter errors to separate debug (not shown to user) and user friendly messages 113 114 // If nothing to show - showing nothing 115 if ( !msg ) 116 return; 117 118 // Forcing message to be string (in case object given - relying on native toString() ) 119 var msg = msg + ''; 120 121 // Removing trash 122 msg = msg.replace('uncaught exception:', ''); 123 124 mwState( mwError(msg) ); 125 126} //FUNC mwExHandle 127 128var mwHintShow = false; 129 130function mwWatchHints ($context, $dialog) { 131 132 var $target = ( $dialog ) ? '#' + $dialog + ' .winStatus' : '#HintPlaceholder'; 133 134 $context = _jq($context); 135 136 $context 137 .off('mouseenter.mwHints') 138 .off('mouseleave.mwHints') 139 .on('mouseenter.mwHints', '[title], [hint], [error]', function() { 140 141 if ( mwHintShow ) 142 return; 143 144 mwHintShow = true; 145 146 // Saving hintbar content 147 this.HINT_SAVE = jQuery($target).html(); 148 149 // Temporary allowing 'title' attribute to act as hint. 150 // Later only 'hint' will be used to avoid title tricks 151 152 // First trying if there is error 153 var hint = jQuery(this).attr('error'); 154 var cls = 'error'; 155 156 // If no error, trying hint 157 if ( !hint ) { 158 hint = jQuery(this).attr('hint') || jQuery(this).attr('title'); 159 cls = 'hint'; 160 } //IF no error 161 162 // Placing hint 163 if ( hint ) 164 jQuery($target).html('<div class="status ' + cls + '">' + hint + '</div>'); 165 166 // Removing title ( unnecessary later ) 167 this.TITLE_SAVE = this.title; 168 this.title = ''; 169 170 }) //FUNC mouseenter 171 .on('mouseleave.mwHints', '[title], [hint], [error]', function() { 172 173 this.title = this.TITLE_SAVE; 174 jQuery($target).html(this.HINT_SAVE); 175 176 mwHintShow = false;
177 }) //FUNC mouseleave 178 ; //jQuery(context) 179 180} //FUNC mwWatchHints 181 182/*--------------------------------------------------------------------------------*\ 183| setHintElements 184|---------------------------------------------------------------------------------- 185| Set's elements for dynamic hints. 186| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 187| Params: 188| selector string - Target elements jQuery selector. 189| Return: 190| bool - Always FALSE. 191\*--------------------------------------------------------------= by Mr.V!T =-----*/ 192function setHintElements (selector, dialog) { 193 194 var target = ( dialog ) ? '#' + dialog + ' .winStatus' : '#HintPlaceholder'; 195 196 selector = _jq(selector); 197 198 selector 199 .unbind('mouseenter') 200 .unbind('mouseleave') 201 .hover( function() { 202 203 // Saving hintbar content 204 HINT_SAVE = jQuery(target).html(); 205 206 // Temporary allowing 'title' attribute to act as hint. 207 // Later only 'hint' will be used to avoid title tricks 208 209 // First trying if there is error 210 var hint = jQuery(this).attr('error'); 211 var cls = 'error'; 212 213 // If no error, trying hint 214 if ( !hint ) { 215 hint = jQuery(this).attr('hint') || jQuery(this).attr('title'); 216 cls = 'hint'; 217 } //IF no error 218 219 // Placing hint 220 if ( hint ) 221 jQuery(target).html('<div class="status ' + cls + '">' + hint + '</div>'); 222 223 // Removing title ( unnecessary later ) 224 TITLE_SAVE = this.title; 225 this.title = ''; 226 227 }, //FUNC over 228 function() { 229 230 this.title = TITLE_SAVE; 231 232 if ( HINT_SAVE !== false ) 233 jQuery(target).html(HINT_SAVE); 234 } //FUNC out 235 ); //jQuery onclick 236 237} //FUNC setHintElements 238 239/** //** ----= mwUpdateScrolls =--------------------------------------------------------------------------------------\**//** \ 240* 241* Updates scollable contents. 242* 243* @param jQuery [$context] - Context to search scrolls within. 244* 245* @return jQuery - Scrollable elements found. 246* 247\**//** ---------------------------------------------------------------------------= by Mr.V!T @ Morad Media Inc. =----/** //**/ 248function mwUpdateScrolls ($context) { 249 250 if ( !isFunction(jQuery.fn.mCustomScrollbar) ) 251 return false; 252 253 $context = $context ? _jq($context) : jQuery(document); 254 255 var $scrolls = $context.find('.mwScroll'); 256 257 $scrolls.mCustomScrollbar('destroy') 258 $scrolls.mCustomScrollbar({ 259 theme : 'dark', 260 autoHideScrollbar : true, 261 // scrollInertia : false, 262 contentTouchScroll : true, 263 advanced : { 264 // autoScrollOnFocus : true 265 } 266 }); //mCustomScrollbar 267 268 return $scrolls; 269} //FUNC mwUpdateScrolls 270 271/** //** ----= OBJECT mwAjax =--------------------------------------------------------------------------------------\**//** \ 272* 273* Morweb system Ajax procesing object. 274* 275* @package Morweb 276* @subpackage System 277* @category helper 278* 279* @param string url - Path to controller to request from. 280* 281* @param MIXED [post] - Data to post on request. Can be DOM form, jQuery selector 282* or object which points to form, or object with parameters. 283* 284* @param MIXED [dialog]- Any valid mwState() dialog value. 285* 286\**//** ---------------------------------------------------------------------------= by Mr.V!T @ Morad Media Inc. =----/** //**/ 287function mwAjax (url, data, dialog) { 288 289 // Creating morweb extension object 290 var exObj = { 291 292 'dialog' : dialog, // Dialog related to call. Will be used to display status. 293 294// ==== CONTENTS =============================================================================================================== 295 296 /** //** ----= parseContents =------------------------------------------------------------------------------\**//** \ 297 * 298 * Parses AraxResult for different content types. 299 * 300 * @param object(AjaxResult) data - Result in vAjax object format. 301 * 302 \**//** -------------------------------------------------------------------= by Mr.V!T @ Morad Media Inc. =----/** //**/ 303 parseContents : function (data) { 304 305 var self = this; 306 307 // If smth wrong come - nothing to do 308 if ( !data ) return; 309 310 // ---- Processing debug (unexpected output) ---- 311 312 if ( data._debug && typeof(mwRawDump) != 'undefined' ) 313 mwRawDump('#wDebugCurrent', data._debug); 314 315 delete data._debug; 316 317 // ---- Processing validations ---- 318 319 if ( data._validations ) { 320 321 // To be sure that smth correct come 322 if ( typeof(data._validations) == 'object' ) { 323 324 //Processig each given validations form 325 for ( var form in data._validations ) { 326 327 // Skipping not forms ( numeric indexies are allowed ) 328 if ( isInt(form) ) continue; 329 330 // Normally forms are specified by ids, if not found, then it's for custom processing 331 // Trying to define context first to speedup and avoid cross windows applying 332 var context = ( typeof(this.dialog) == 'string ' ) ? mwWindow(this.dialog).Body : jQuery('#' + form); 333 334 // Setting validations 335 setValidations(context, data._validations[form]); 336 337 } //FOR each form 338 339 }
339 //IF object comed 340 341 } //IF validations given 342 343 // ---- Processing cahces ----- 344 345 if ( !data._cache ) return; 346 347 var cache = data._cache; 348 delete data._cache; 349 350 // HTML comed can contain errors, 351 // though jQuery may still insert it, exception is happen right AFTER insert. 352 // To prevent script stop (content was inserted anyway) - catching exceptions 353 // for each insert individually (to process others which are succeed) and relogging them in console. 354 355 // ---- Setting up data cache ---- 356 357 // Making sure mwData exists at all 358 if ( typeof(mwData) == 'undefined' ) 359 mwData = {}; 360 361 if ( cache.Data ) { 362 363 /*/ 364 if (mwData.Users); 365 __(mwData.Users); 366 367 /**/ 368 // ToDo: Seems that jQuery.extend() does not merge arrays propertly 369 // And empty objects/assoc arrays (which meant to be data objects) 370 // come as list arrays, which are not merged 371 jQuery.extend(true, mwData, cache.Data); 372 /*/ 373 374 if (mwData.Users); 375 __(mwData.Users); 376 /**/ 377 } //IF Data set 378 379 // ---- Setting up windows ---- 380 381 // Only supporting windows when windows lib is loaded (backend/liveEd) 382 // Windows are not created/supported for bare frontend currently 383 384 if ( cache.Windows && (typeof(mwWindow) !== 'undefined') ) { 385 386 // Using mwWinManager to get windows system container 387 var $winContainer = mwWinManager.init().Container; 388 389 for ( var i in cache.Windows ) { 390 391 // Checking for html within regular results 392 if ( !data['_wc_'+i] ) continue; 393 394 var wnd = mwWindow(i); 395 var $old = wnd.Window; 396 397 // Disablingg old window, but keeping it's element 398 // This allows updated window to init in background, with smooth transition 399 // In addition - increasing z-index, to make sure it stays on top, covering new version 400 if ( $old && $old.length ) { 401 402 // Removing IDs and names from old elements, to allow proper init 403 $old.removeAttr('id') 404 $old.find('[id], [name]').removeAttr('id name'); 405 406 // Increasing z-index, just setting it notably higher 407 $old.css('z-index', $old.css('z-index')*1+100 ); 408 409 } //IF old window present 410 411 try { 412 var el = jQuery('<div id="' + i + '" class="winEl">' + data['_wc_'+i] + '</div>') 413 .appendTo($winContainer); 414 415 } catch (e) { 416 417 // Researching window, cuz it still may be inserted 418 var el = $winContainer.find('#' + i); 419 420 console.error(e); 421 } //TRY 422 423 // Initiating window 424 wnd.Element(el).align(); 425 426 // Removing old window element if there was one 427 if ( $old && $old.length ) 428 $old.remove(); 429 430 // Initiating title 431 if ( cache.Windows[i] ) 432 wnd.Title(cache.Windows[i]); 433 434 delete data['_wc_'+i]; 435 436 } //FOR each window in system 437 438 } //IF windows set 439 440 // ---- Setting up contents ---- 441 442 if ( cache.Contents ) { 443 444 for ( var i in cache.Contents ) { 445 // Checking for html within regular results 446 if ( !data['_cc_'+i] ) continue; 447 448 try { 449 jQuery('#' + i).html(data['_cc_'+i]); 450 } catch (e) { 451 console.error(e); 452 } //TRY 453 454 delete data['_cc_'+i]; 455 } //FOR each contents 456 457 } //IF contents set 458 459 // ---- Setting up subcontents ---- 460 461 // Making sure mwSubContents exists at all 462 if ( typeof(mwSubContents) == 'undefined' ) 463 mwSubContents = {}; 464 465 if ( cache.SubContents ) { 466 467 for ( var i in cache.SubContents ) { 468 469 // Checking for html within regular results 470 if ( !data['_sc_'+i] ) continue; 471 472 mwSubContents[i] = data['_sc_'+i]; 473 474 delete data['_sc_'+i]; 475 } //FOR each subcontents 476 477 } //IF subcontents set 478 479 // ---- Running java init ---- 480 481 if ( cache.Java ) { 482 483 // Executing each given java init 484 for ( var i in cache.Java ) { 485 jQuery.globalEval(cache.Java[i]); 486 } //FOR each java init 487 488 } //IF subcontents set 489 490 }, //FUNC parseResult 491 492// ==== GENERAL ================================================================================================================ 493 494 /** //** ----= init =--------------------------------------------------------------------------------------\**//** \ 495 * 496 * Sets up basic events. Used before constructor return, to make sure that processing triggers before custom events. 497 * 498 * @return SELF 499 * 500 \**//** -------------------------------------------------------------------= by Mr.V!T @ Morad Media Inc. =----/** //**/ 501 init : function () { 502 503 // ---- START ---- 504 505 this.start( function (data) { 506 507 // Setting loading state 508 mwState(true, this.dialog); 509 510 }); //FUNC vAjax.stop.callback 511 512 // ---- STOP ---- 513 514 this.stop( function (data) { 515 516 // Parsing contentns 517 this.parseContents(data); 518 519 }); //FUNC vAjax.stop.callback 520 521 // ---- SUCCESS ---- 522 523 this.success( function (data) { 524 525 // If some of contents come defined updater - calling it. 526 // DEPRECATED: Not used anymore, left from old code for compatability 527 if ( typeof(updateDesktop) == 'function' ) 528 updateDesktop(); 529 530 }); //FUNC vAjax.success.callback 531
532 // ---- ERROR ---- 533 534 this.error( function (data) { 535 536 // Simple results are threated as debug/errors 537 if ( data.status.minor == 'simple' ) { 538 539 if ( data._debug && typeof(mwRawDump) != 'undefined' ) 540 mwRawDump('#wDebugCurrent', data.res); 541 542 // Updating status 543 mwState(false, this.dialog); 544 545 return; 546 } //IF simple 547 548 }); //FUNC vAjax.error.callback 549 550 // ---- DONE ---- 551 552 this.done( function (data) { 553 554 // Updating status 555 mwState(data.status.text, this.dialog); 556 557 }); //FUNC vAjax.stop.callback 558 559 return this; 560 561 }, //FUNC init 562 563 /** //** ----= go =--------------------------------------------------------------------------------------\**//** \ 564 * 565 * Basic posting method. Proceeds ajax requests, parses contents, calls callbacks and updates system status. 566 * 567 * @param object(AjaxResult) data - Result in vAjax object format. 568 * 569 \**//** -------------------------------------------------------------------= by Mr.V!T @ Morad Media Inc. =----/** //**/ 570 go : function () { 571 572 // Before posting attempting to reset current validations on dialog (if one specified) 573 if ( typeof(this.dialog) == 'string' && (typeof(mwWindow) !== 'undefined') ) 574 setValidations( mwWindow(this.dialog).Body, {}); 575 576 this.post(); 577 578 return this; 579 580 }, //FUNC go 581 582// ==== CONTENT TYPES ========================================================================================================== 583 584 /** //** ----= content =--------------------------------------------------------------------------------------\**//** \ 585 * 586 * Loads content from contoller specified. And applies to specified element if supplied.
587 * 588 * @param MIXED target - Target to insert content to. Can be jQuery selector, 589 * jQuery object, DOM element, or callback function. Function 590 * passed as target will act as onSuccess callback. 591 * 592 * @return SELF 593 * 594 \**//** -------------------------------------------------------------------= by Mr.V!T @ Morad Media Inc. =----/** //**/ 595 content : function (target) { 596 597 this.go(); 598 599 if ( isFunction(target) ) 600 this.success(target); 601 else 602 this.success( function (data) { 603 604 if ( !target ) return; 605 606 // If common content come - inserting it into target 607 if ( data.content !== undefined ) { 608 609 target = _jq(target); 610 611 target.html(data.content); 612 613 } //IF content set. 614 615 }); //FUNC onSuccess 616 617 return this; 618 }, //FUNC content 619 620 /** //** ----= index =--------------------------------------------------------------------------------------\**//** \ 621 * 622 * This was designed with idea of index reload. Can take optional callback parameter. 623 * On success action it reloads index from controller specified, closes related dialogs, calls given callback and 624 * triggers status. Callback will be called after success reload, all elements positioning and status updates. 625 * 626 * @param function 627 * [callback] - Callback to call upon success. 628 * If callback returns FALSE, dialog will be not 629 * canceled and status will be not updated. 630 * 631 * @return SELF 632 * 633 \**//** -------------------------------------------------------------------= by Mr.V!T @ Morad Media Inc. =----/** //**/ 634 index : function (callback) { 635 636 // Getting scroll position of scroll table to be fancy 637 // ToDo: scrollTable instance method for reinit 638 var $pos = jQuery('.mwScrollTable.body').scrollTop(); 639 640 return this 641 .go() 642 .success( function (data) { 643 644 var res = true; 645 646 if ( typeof(callback) == 'function' ) 647 res = callback(data); 648 649 if ( res !== false ) { 650 651 if ( typeof(this.dialog) == 'string' && (typeof(mwWindow) !== 'undefined') ) 652 mwWindow(this.dialog).hide(); 653 654 // Status was updated in window, but if it's closed - text status should go in hintbar 655 if ( data.status.text ) 656 mwState(data.status.text); 657 658 // Index tables 659 jQuery('.mwIndexTable').each( function () { 660 661 mwScrollTable( jQuery(this), { 662 container : jQuery('.mwDesktop'), 663 }); 664 665 }); //jQuery.each scroll table 666 667 // Resetting scroll position to top 668 jQuery('.mwScrollTable.body').scrollTop($pos); 669 670 } //IF all ok 671 672 return res; 673 674 }) //FUNC onSuccess 675 ; //this 676 677 }, //FUNC index 678 679 /** //** ----= window =--------------------------------------------------------------------------------------\**//** \ 680 * 681 * Based on content loading it targets one specified window and shows it on success. 682 * Can take optional callback parameter, which will be called on success, but before show window. 683 * 684 * @param string name - Name of dialog to show upon loading. 685 * 686 * @param function 687 * [callback] - Callback to call upon success. 688 * If callback returns FALSE, dialog will be not 689 * opened and status will be not updated. 690 * 691 * @return SELF 692 * 693 \**//** -------------------------------------------------------------------= by Mr.V!T @ Morad Media Inc. =----/** //**/ 694 window : function (name, callback) { 695 696 return this 697 .go() 698 .success( function (data) { 699 700 var res = true; 701 702 if ( typeof(callback) == 'function' ) 703 res = callback(data); 704 705 if ( res !== false ) 706 mwWindow(name).show(); 707 708 return res; 709 }); //FUNC 710 711 } //FUNC window 712 713 }; //OBJECT mwAjax 714 715 // Getting basic vAjax object, and extending it with morweb behavior 716 var vAjaxObj = vAjax(url, data); 717 718 jQuery.extend(vAjaxObj, exObj); 719 720 // Initiating basic events 721 vAjaxObj.init(); 722 723 // Returning it to user 724 return vAjaxObj; 725} //CONSTRUCTOR mwAjax 726 727/** //** ----= OBJECT mwSubContent =--------------------------------------------\**//** \ 728* 729* System SubContents processing tools. 730* 731* @param jQuery container - Container element to setup with subcontents. 732* @param jQuery [animation] - Element to use for animations. Possible values: 733* jQuery compatable pointer to element to animate, 734* TRUE to animate container element (default behavior), 735* FALSE to cancel animations (for manual animating). 736* 737\**//** ------------------------------------= by Mr.V!T @ Morad Media Inc. =----/** //**/ 738function mwSubContent (_container, _animation) { 739 740 // Validating environment 741 _container = _jq(_container); 742 743 if ( _animation === undefined ) 744 _animation = true; 745 746 return { 747 748 storage : jQuery('#sysSubContents'), // System subContents storage. 749 container : _container, // Container element to operatie with. 750 animation : _animation, // Element to animate on operations. For internal use. To setup use animate() method. 751 752 /** //** ----= animate =----------------------------------------------\**//** \ 753 * 754 * Applies animation to set element and calls callback on final. For internal use. 755 *
756 * @param string type - Animation type: 'show' or 'hide'. 757 * @param function [callback] - Callback to call on final. 758 * 759 * @return SELF 760 * 761 \**//** ------------------------------------= by Mr.V!T @ Morad Media Inc. =----/** //**/ 762 animate : function ( type, callback ) { 763 764 // Calculating animation target 765 var a; 766 767 if ( this.animation === true ) 768 a = this.container; 769 else if ( this.animation === false ) 770 a = false; 771 else 772 a = _jq(this.animation); 773 774 // Ensuring callback is a function 775 callback = callback || function(){}; 776 777 // ---- Applying animation if set ---- 778 779 if ( a ) { 780 781 // If animation target set - calling proper animation and returning. 782 // If no valid animation - doing nothing, it will proceed to default no animation flow. 783 switch ( type ) { 784 case 'show' : 785 mwShow(a, callback); 786 return this; 787 case 'hide' : 788 mwHide(a, callback); 789 return this; 790 } //SWITCH type 791 792 } //IF animation 793 794 // ---- No animation ---- 795 796 if ( typeof(callback) == 'function' ) 797 callback(); 798 799 return this; 800 }, //FUNC animate 801 802 /** //** ----= setup =----------------------------------------------\**//** \ 803 * 804 * Replaces container subContents with subContent specified, cleaning container. 805 * Applies animations if set. Calls callback after subContent inserted and before show. 806 * New subContent will be passed to callbacks. 807 * 808 * @param string id - SubContainer system ID. 809 * 810 * @param function [callback] - Callback to call after hide and setup. 811 * @param function [onfinal] - Callback to call after final show. 812 * 813 * @return SELF 814 * 815 \**//** ------------------------------------= by Mr.V!T @ Morad Media Inc. =----/** //**/ 816 setup : function (id, callback, onfinal) { 817 818 var self = this; // Shortcut to use in callback 819 820 // Calling cleaner, this will also hide container 821 this.unset( function () { 822 823 // Attaching content 824 // var el = jQuery('#' + id); 825 var el = jQuery(mwSubContents[id]); 826 el.appendTo(self.container); 827 828 // Showing container 829 self.animate('show', function () { 830 // Calling final callback 831 if ( typeof(onfinal) == 'function' ) 832 onfinal(el); 833 834 }); //FUNC onShow 835 836 // Small delay to allow to update contents dimensions 837 setTimeout( function () { 838 // Calling callback, it will start before animated, 839 // but after animaiton start - contents become real 840 if ( typeof(callback) == 'function' ) 841 callback(el); 842 }, 1); 843 844 }); //FUNC onHide 845 846 return this; 847 }, //FUNC setup 848 849 /** //** ----= unset =----------------------------------------------\**//** \ 850 * 851 * Clears container from subContents, moving them to system storage. 852 * Calls callback after clean. 853 * 854 * @param function [callback] - Callback to call on done. 855 * 856 * @return SELF 857 * 858 \**//** ------------------------------------= by Mr.V!T @ Morad Media Inc. =----/** //**/ 859 unset : function ( callback ) { 860 861 var self = this; // Shortcut to use in callback 862 863 this.animate('hide', function () { 864 865 // Removing all childs in container. Container means only subcontents 866 // self.container.find('.subContent').appendTo('#sysSubContents'); 867 self.container.empty(); 868 869 if ( typeof(callback) == 'function' ) 870 callback(); 871 872 }); //FUNC onHide 873 874 return this; 875 } //FUNC unset 876 877 }; //OBJECT mwSubContent 878 879} //CONSTRUCTOR mwSubContent
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.