From cdd68ef81f84ab5eab8e8bb30e656331aafb1ece Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 10 Jun 2013 11:48:23 +0530 Subject: [PATCH] [form] [toolbar] prepend save button --- public/js/wn/ui/appframe.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/js/wn/ui/appframe.js b/public/js/wn/ui/appframe.js index b42abec47a..f2f7cabc5d 100644 --- a/public/js/wn/ui/appframe.js +++ b/public/js/wn/ui/appframe.js @@ -200,10 +200,11 @@ wn.ui.AppFrame = Class.extend({ this.buttons[label] && this.buttons[label].remove(); + var append_or_prepend = is_title ? "prependTo" : "appendTo"; + this.buttons[label] = $(repl('', args)) - .appendTo(this.toolbar.find(".btn-group").css({"margin-right": "5px"})) - //.appendTo(title_toolbar ? this.$w.find(".title-button-area") : this.toolbar.find(".btn-group")) + [append_or_prepend](this.toolbar.find(".btn-group").css({"margin-right": "5px"})) .attr("title", wn._(label)) .click(click); if(is_title) {