1 // ==========================================================================
  2 // Project:   The M-Project - Mobile HTML5 Application Framework
  3 // Copyright: (c) 2010 M-Way Solutions GmbH. All rights reserved.
  4 // Creator:   Dominik
  5 // Date:      02.12.2010
  6 // License:   Dual licensed under the MIT or GPL Version 2 licenses.
  7 //            http://github.com/mwaylabs/The-M-Project/blob/master/MIT-LICENSE
  8 //            http://github.com/mwaylabs/The-M-Project/blob/master/GPL-LICENSE
  9 // ==========================================================================
 10 
 11 /**
 12  * @class
 13  *
 14  * M.LoaderView is the prototype for a loader a.k.a. activity indicator. This very simple
 15  * view can be used to show the user that something is happening, e.g. while the application
 16  * is waiting for a request to return some data.
 17  *
 18  * @extends M.View
 19  */
 20 M.LoaderView = M.View.extend(
 21 /** @scope M.LoaderView.prototype */ {
 22 
 23     /**
 24      * The type of this object.
 25      *
 26      * @type String
 27      */
 28     type: 'M.LoaderView',
 29 
 30     /**
 31      * This method shows the loader.
 32      */
 33     show: function() {
 34         $.mobile.pageLoading();
 35     },
 36 
 37     /**
 38      * This method hides the loader.
 39      */
 40     hide: function() {
 41         $.mobile.pageLoading(YES);
 42     }
 43     
 44 });