Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

getInitialvalue was added to attributeEditor object. see issue5755

  • Loading branch information...
commit 5d32d8a92f32982f8f160ee728f092ba2f62d867 1 parent fb4bfbd
Farshid Beheshti authored August 06, 2012 SebastianZ committed August 07, 2012
13  extension/content/firebug/html/htmlPanel.js
@@ -2262,6 +2262,19 @@ AttributeEditor.prototype = domplate(Firebug.InlineEditor.prototype,
2262 2262
         var emptyAttr = {name: "", value: ""};
2263 2263
         var sibling = insertWhere == "before" ? target.previousSibling : target;
2264 2264
         return AttrTag.insertAfter({attr: emptyAttr}, sibling);
  2265
+    },
  2266
+
  2267
+    getInitialValue: function(target, value)
  2268
+    {
  2269
+        if(value == "")
  2270
+            return value;
  2271
+        var element = Firebug.getRepObject(target);
  2272
+            if(element && element instanceof window.Element)
  2273
+            {
  2274
+                var attributeName = Dom.getPreviousByClass(target, "nodeName").textContent;
  2275
+                return element.getAttribute(attributeName);
  2276
+            }
  2277
+        return value;
2265 2278
     }
2266 2279
 });
2267 2280
 

0 notes on commit 5d32d8a

Please sign in to comment.
Something went wrong with that request. Please try again.