summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jarmon/jarmon.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/jarmon/jarmon.js b/jarmon/jarmon.js
index 0b72949..d4f902c 100644
--- a/jarmon/jarmon.js
+++ b/jarmon/jarmon.js
@@ -1022,6 +1022,35 @@ jarmon.TabbedInterface = function($tpl, recipe) {
}
}
);
+
+ $('ul.css-tabs > li > a', $tpl[0]).live(
+ 'dblclick',
+ {self: this},
+ function(e) {
+ var $originalLink = $(this);
+ var $input = $('<input/>', {
+ 'value': $originalLink.text(),
+ 'name': 'editTabTitle'
+ })
+ $originalLink.replaceWith($input);
+ $input.focus();
+ }
+ );
+
+ $('ul.css-tabs > li > input[name=editTabTitle]', $tpl[0]).live(
+ 'blur',
+ {self: this},
+ function(e) {
+ var self = e.data.self;
+ $(this).replaceWith(
+ $('<a/>', {
+ href: ['#', this.value].join('')
+ }).text(this.value)
+ )
+ self.setup();
+ self.$tabBar.data("tabs").click(this.value);
+ }
+ );
};
jarmon.TabbedInterface.prototype.newTab = function(tabName) {