Просмотр исходного кода

New method for loading element

@soyjavi 14 лет назад
Родитель
Сommit
9fbbe4d7eb
1 измененных файлов с 8 добавлено и 5 удалено
  1. 8 5
      src/view/Lungo.View.Element.js

+ 8 - 5
src/view/Lungo.View.Element.js

@@ -61,18 +61,21 @@ LUNGO.View.Element = (function(lng, undefined) {
     /**
     /**
      * Set a progress to the element
      * Set a progress to the element
      *
      *
-     * @method progress
+     * @method loading
      *
      *
      * @param  {string}  Element query selector
      * @param  {string}  Element query selector
-     * @param  {number}  Percentage
-     * @param  {boolean} Show the labels: description and current percentage
-     * @param  {string}  Description
+     * @param  {number}  stylesheet (null for hide)
      */
      */
     var loading = function(selector, stylesheet) {
     var loading = function(selector, stylesheet) {
         var element = lng.dom(selector);
         var element = lng.dom(selector);
 
 
         if (element) {
         if (element) {
-            _bindAttribute(element, LUNGO.Attributes.Data.Loading, stylesheet);
+            if (stylesheet) {
+                _bindAttribute(element, LUNGO.Attributes.Data.Loading, stylesheet);
+            }
+            else {
+                element.children('.loading').addClass('disabled');
+            }
         }
         }
     };
     };