linterna-magica-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linterna-magica-commit] [350] Improved width management for the new int


From: Ivaylo Valkov
Subject: [linterna-magica-commit] [350] Improved width management for the new interface.
Date: Fri, 21 Dec 2012 13:37:49 +0000

Revision: 350
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=350
Author:   valkov
Date:     2012-12-21 13:37:43 +0000 (Fri, 21 Dec 2012)
Log Message:
-----------
Improved width management for the new interface. Tasks #12203.

Ticket Links:
------------
    http://savannah.gnu.org/task/?12203

Modified Paths:
--------------
    trunk/data/style/template.css
    trunk/src/lm_constructors.js
    trunk/src/lm_create_video_object.js
    trunk/src/lm_extract_dom_objects.js
    trunk/src/lm_extract_js_scripts.js

Modified: trunk/data/style/template.css
===================================================================
--- trunk/data/style/template.css       2012-12-21 11:47:15 UTC (rev 349)
+++ trunk/data/style/template.css       2012-12-21 13:37:43 UTC (rev 350)
@@ -740,3 +740,7 @@
     width: 80px !important;
     height: 22px !important;
 }
+
+.linterna-magica-lower {
+    /* border: 1px solid red !important; */
+}

Modified: trunk/src/lm_constructors.js
===================================================================
--- trunk/src/lm_constructors.js        2012-12-21 11:47:15 UTC (rev 349)
+++ trunk/src/lm_constructors.js        2012-12-21 13:37:43 UTC (rev 350)
@@ -233,9 +233,10 @@
 // One HD links buttom (1x24)
 // One logo button (1x116)
 // One close button after the logo (1x24) 
-LinternaMagica.prototype.min_height = 212;
+LinternaMagica.prototype.absolute_min_height = 212;
 
 
+LinternaMagica.prototype.absolute_min_width = 300;
 LinternaMagica.prototype.min_width = 400;
 
 // One close button (1x24)

Modified: trunk/src/lm_create_video_object.js
===================================================================
--- trunk/src/lm_create_video_object.js 2012-12-21 11:47:15 UTC (rev 349)
+++ trunk/src/lm_create_video_object.js 2012-12-21 13:37:43 UTC (rev 350)
@@ -36,17 +36,7 @@
        return;
     }
 
-    if (object_data.width < this.min_width)
-    {
-       object_data.width = this.min_width;
-    }
-
-    if (object_data.height < this.min_height)
-    {
-       object_data.height = this.min_height;
-    }
-
-
+  
     var toggle_plugin = null;
 
     var id = object_data.linterna_magica_id;
@@ -81,6 +71,10 @@
     container.setAttribute("id", "linterna-magica-"+id);
     container.setAttribute("class", "linterna-magica");
 
+    if (object_data.width < this.min_width) {
+       container.setAttribute("class", "linterna-magica-lower");
+    }
+
     // Fix for rtl languages. See
     // https://savannah.nongnu.org/bugs/?32740
     // https://savannah.nongnu.org/task/?11056

Modified: trunk/src/lm_extract_dom_objects.js
===================================================================
--- trunk/src/lm_extract_dom_objects.js 2012-12-21 11:47:15 UTC (rev 349)
+++ trunk/src/lm_extract_dom_objects.js 2012-12-21 13:37:43 UTC (rev 350)
@@ -354,9 +354,9 @@
     }
 
 
-    if (!width || (width < this.min_width))
+    if (!width || (width < this.absolute_min_width))
     {
-       width = this.min_width;
+       width = this.absolute_min_width;
     }
 
     return parseInt(width);
@@ -408,9 +408,9 @@
        height = element.parentNode.offsetHeight;
     }
 
-    if (!height || (height<this.min_height))
+    if (!height || (height<this.absolute_min_height))
     {
-       height = this.min_height;
+       height = this.absolute_min_height;
     }
 
     return parseInt(height);

Modified: trunk/src/lm_extract_js_scripts.js
===================================================================
--- trunk/src/lm_extract_js_scripts.js  2012-12-21 11:47:15 UTC (rev 349)
+++ trunk/src/lm_extract_js_scripts.js  2012-12-21 13:37:43 UTC (rev 350)
@@ -127,14 +127,14 @@
 
        if (object_data && object_data.width && object_data.height)
        {
-           if(object_data.height < this.min_height)
+           if(object_data.height < this.absolute_min_height)
            {
-               object_data.height = this.min_height;
+               object_data.height = this.absolute_min_height;
            }
            
-           if (object_data.width < this.min_width)
+           if (object_data.width < this.absolute_min_width)
            {
-               object_data.width = this.min_width;
+               object_data.width = this.absolute_min_width;
            }
        }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]