Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r16312: LJSV-336 (Error message/system text for ...

Committer: ailyin
LJSV-336 (Error message/system text for custom mood theme creator): flexisquares didn't output mood theme images properly, fix it

U   trunk/bin/upgrading/s2layers/core1.s2
Modified: trunk/bin/upgrading/s2layers/core1.s2
===================================================================
--- trunk/bin/upgrading/s2layers/core1.s2	2010-03-03 10:15:19 UTC (rev 16311)
+++ trunk/bin/upgrading/s2layers/core1.s2	2010-03-03 10:16:41 UTC (rev 16312)
@@ -179,6 +179,9 @@
     function as_string (string alttext) : string
     "Return an HTML tag for this Image with given alttext";
 
+    function as_string_ex (string alttext, string attributes) : string
+    "Return an HTML tag for this Image with given alttext and given additional HTML tag attributes";
+
     function as_string (string{} opts) : string
     "Return the HTML for an image, Supported keys are 'href' to create a link to the image source
      and 'a_attr' which adds attributes to the anchor tag if a link is to be printed.";
@@ -1956,6 +1959,10 @@
 }
 
 function Image::as_string(string alttext) [fixed] : string {
+    return $this->as_string_ex($alttext, "");
+}
+
+function Image::as_string_ex(string alttext, string attributes) [fixed] : string {
     var string extraParams = "";
 
     foreach var string extraKey ($.extra) {
@@ -1965,6 +1972,8 @@
     if ($.height) { $extraParams = $extraParams + """height="$.height" """; }
     if ($.width)  { $extraParams = $extraParams +  """width="$.width" """; }
 
+    $extraParams = $extraParams + $attributes;
+
     return "<img src=\"$.url\" title=\"\" alt=\"" + ehtml($alttext) + "\"" +
         $extraParams + " />";
 }

Tags: andy, livejournal, s2
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments