[PATCH 0/3] Update button labels

Crístian Viana (3): Add missing closing quote in HTML code Use the verb "Create" in all create operations Use action verb as the main button's label po/en_US.po | 11 ++++------- po/kimchi.pot | 7 ++----- po/pt_BR.po | 11 ++++------- po/zh_CN.po | 11 ++++------- ui/js/src/kimchi.guest_edit_main.js | 8 ++++---- ui/js/src/kimchi.repository_edit_main.js | 6 +++--- ui/js/src/kimchi.template_edit_main.js | 2 +- ui/pages/guest-edit.html.tmpl | 4 ++-- ui/pages/repository-edit.html.tmpl | 4 ++-- ui/pages/storagepool-add.html.tmpl | 2 +- ui/pages/template-add.html.tmpl | 2 +- ui/pages/template-edit.html.tmpl | 2 +- 12 files changed, 29 insertions(+), 41 deletions(-) -- 1.9.0

There is an HTML attribute value on the page "Edit repository" which is not surrounded properly by quotes; there is only the opening quote, not the closing one. That is wrong HTML syntax. Fix the code by adding the missing closing quote. Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com> --- ui/pages/repository-edit.html.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/pages/repository-edit.html.tmpl b/ui/pages/repository-edit.html.tmpl index cad95e8..fbef4f3 100644 --- a/ui/pages/repository-edit.html.tmpl +++ b/ui/pages/repository-edit.html.tmpl @@ -103,7 +103,7 @@ </div> <footer> <div class="btn-group"> - <button type="submit id="repository-edit-button-save" class="btn-normal"> + <button type="submit" id="repository-edit-button-save" class="btn-normal"> <span class="text">$_("Save")</span> </button> </div> -- 1.9.0

On 05/15/2014 04:39 AM, Crístian Viana wrote:
There is an HTML attribute value on the page "Edit repository" which is not surrounded properly by quotes; there is only the opening quote, not the closing one. That is wrong HTML syntax.
Fix the code by adding the missing closing quote.
Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com> Reviewed-by: Hongliang Wang <hlwang@linux.vnet.ibm.com> --- ui/pages/repository-edit.html.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/pages/repository-edit.html.tmpl b/ui/pages/repository-edit.html.tmpl index cad95e8..fbef4f3 100644 --- a/ui/pages/repository-edit.html.tmpl +++ b/ui/pages/repository-edit.html.tmpl @@ -103,7 +103,7 @@ </div> <footer> <div class="btn-group"> - <button type="submit id="repository-edit-button-save" class="btn-normal"> + <button type="submit" id="repository-edit-button-save" class="btn-normal"> <span class="text">$_("Save")</span> </button> </div>

Reviewed-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> On 05/15/2014 04:39 AM, Crístian Viana wrote:
There is an HTML attribute value on the page "Edit repository" which is not surrounded properly by quotes; there is only the opening quote, not the closing one. That is wrong HTML syntax.
Fix the code by adding the missing closing quote.
Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com> --- ui/pages/repository-edit.html.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/pages/repository-edit.html.tmpl b/ui/pages/repository-edit.html.tmpl index cad95e8..fbef4f3 100644 --- a/ui/pages/repository-edit.html.tmpl +++ b/ui/pages/repository-edit.html.tmpl @@ -103,7 +103,7 @@ </div> <footer> <div class="btn-group"> - <button type="submit id="repository-edit-button-save" class="btn-normal"> + <button type="submit" id="repository-edit-button-save" class="btn-normal"> <span class="text">$_("Save")</span> </button> </div>
-- Thanks and best regards! Sheldon Feng(冯少合)<shaohef@linux.vnet.ibm.com> IBM Linux Technology Center

Currently, some create operations use the verb "create", some use "add" and some use "define". There doesn't seem to be a difference in the use of those words. Change some labels in order to use the same verb in all create operations. The translation entries in "zh_CN" were removed because I don't know how to update them. Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com> --- po/en_US.po | 8 ++++---- po/kimchi.pot | 4 ++-- po/pt_BR.po | 8 ++++---- po/zh_CN.po | 8 ++++---- ui/pages/storagepool-add.html.tmpl | 2 +- ui/pages/template-add.html.tmpl | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/po/en_US.po b/po/en_US.po index 1ede7dc..5c3d5d8 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -1414,8 +1414,8 @@ msgstr "" msgid "No" msgstr "" -msgid "Define a New Storage Pool" -msgstr "Define a New Storage Pool" +msgid "Create a New Storage Pool" +msgstr "Create a New Storage Pool" msgid "Storage Pool Name" msgstr "Storage Pool Name" @@ -1485,8 +1485,8 @@ msgstr "iSCSI Authentication" msgid "SCSI Adapter" msgstr "" -msgid "Add Template" -msgstr "Add Template" +msgid "Create Template" +msgstr "Create Template" msgid "Where is the source media for this template? " msgstr "Where is the source media for this template?" diff --git a/po/kimchi.pot b/po/kimchi.pot index 9e875f1..89e6567 100755 --- a/po/kimchi.pot +++ b/po/kimchi.pot @@ -1404,7 +1404,7 @@ msgstr "" msgid "No" msgstr "" -msgid "Define a New Storage Pool" +msgid "Create a New Storage Pool" msgstr "" msgid "Storage Pool Name" @@ -1471,7 +1471,7 @@ msgstr "" msgid "SCSI Adapter" msgstr "" -msgid "Add Template" +msgid "Create Template" msgstr "" msgid "Where is the source media for this template? " diff --git a/po/pt_BR.po b/po/pt_BR.po index 5ff54e0..b0058c4 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -1521,8 +1521,8 @@ msgstr "Sim" msgid "No" msgstr "Não" -msgid "Define a New Storage Pool" -msgstr "Definir novo Storage Pool" +msgid "Create a New Storage Pool" +msgstr "Criar novo Storage Pool" msgid "Storage Pool Name" msgstr "Nome do Storage Pool" @@ -1591,8 +1591,8 @@ msgstr "Credenciais do iSCSI" msgid "SCSI Adapter" msgstr "Adaptador SCSI" -msgid "Add Template" -msgstr "Adicionar Modelo" +msgid "Create Template" +msgstr "Criar Modelo" msgid "Where is the source media for this template? " msgstr "Onde está a mídia de origem desse modelo? " diff --git a/po/zh_CN.po b/po/zh_CN.po index caef515..2b6ac17 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -1427,8 +1427,8 @@ msgstr "是" msgid "No" msgstr "否" -msgid "Define a New Storage Pool" -msgstr "定义一个新的存储池" +msgid "Create a New Storage Pool" +msgstr "" msgid "Storage Pool Name" msgstr "存储池名称" @@ -1494,8 +1494,8 @@ msgstr "iSCSI认证" msgid "SCSI Adapter" msgstr "SCSI适配器" -msgid "Add Template" -msgstr "创建模板" +msgid "Create Template" +msgstr "" msgid "Where is the source media for this template? " msgstr "模板的源介质在哪里?" diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl index 977db66..992a7fa 100644 --- a/ui/pages/storagepool-add.html.tmpl +++ b/ui/pages/storagepool-add.html.tmpl @@ -25,7 +25,7 @@ <body> <div class="window storage-window"> <header> - <h1 class="title">$_("Define a New Storage Pool")</h1> + <h1 class="title">$_("Create a New Storage Pool")</h1> <div class="close">X</div> </header> <div class="content"> diff --git a/ui/pages/template-add.html.tmpl b/ui/pages/template-add.html.tmpl index afe22dd..569af77 100644 --- a/ui/pages/template-add.html.tmpl +++ b/ui/pages/template-add.html.tmpl @@ -26,7 +26,7 @@ <body> <div class="window" style="width: 992px;height: 660px;"> <header> - <h1 class="title">$_("Add Template")</h1> + <h1 class="title">$_("Create Template")</h1> <div class="close">X</div> </header> <div class="content" style="margin-bottom: 0"> -- 1.9.0

Just a minor inline comment below On 05/15/2014 04:39 AM, Crístian Viana wrote:
Currently, some create operations use the verb "create", some use "add" and some use "define". There doesn't seem to be a difference in the use of those words.
Change some labels in order to use the same verb in all create operations. The translation entries in "zh_CN" were removed because I don't know how to update them.
Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com> --- po/en_US.po | 8 ++++---- po/kimchi.pot | 4 ++-- po/pt_BR.po | 8 ++++---- po/zh_CN.po | 8 ++++---- ui/pages/storagepool-add.html.tmpl | 2 +- ui/pages/template-add.html.tmpl | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/po/en_US.po b/po/en_US.po index 1ede7dc..5c3d5d8 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -1414,8 +1414,8 @@ msgstr "" msgid "No" msgstr ""
-msgid "Define a New Storage Pool" -msgstr "Define a New Storage Pool" +msgid "Create a New Storage Pool" +msgstr "Create a New Storage Pool"
msgid "Storage Pool Name" msgstr "Storage Pool Name" @@ -1485,8 +1485,8 @@ msgstr "iSCSI Authentication" msgid "SCSI Adapter" msgstr ""
-msgid "Add Template" -msgstr "Add Template" +msgid "Create Template" +msgstr "Create Template"
msgid "Where is the source media for this template? " msgstr "Where is the source media for this template?" diff --git a/po/kimchi.pot b/po/kimchi.pot index 9e875f1..89e6567 100755 --- a/po/kimchi.pot +++ b/po/kimchi.pot @@ -1404,7 +1404,7 @@ msgstr "" msgid "No" msgstr ""
-msgid "Define a New Storage Pool" +msgid "Create a New Storage Pool" msgstr ""
msgid "Storage Pool Name" @@ -1471,7 +1471,7 @@ msgstr "" msgid "SCSI Adapter" msgstr ""
-msgid "Add Template" +msgid "Create Template" msgstr ""
msgid "Where is the source media for this template? " diff --git a/po/pt_BR.po b/po/pt_BR.po index 5ff54e0..b0058c4 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -1521,8 +1521,8 @@ msgstr "Sim" msgid "No" msgstr "Não"
-msgid "Define a New Storage Pool" -msgstr "Definir novo Storage Pool" +msgid "Create a New Storage Pool" +msgstr "Criar novo Storage Pool"
msgid "Storage Pool Name" msgstr "Nome do Storage Pool" @@ -1591,8 +1591,8 @@ msgstr "Credenciais do iSCSI" msgid "SCSI Adapter" msgstr "Adaptador SCSI"
-msgid "Add Template" -msgstr "Adicionar Modelo" +msgid "Create Template" +msgstr "Criar Modelo"
msgid "Where is the source media for this template? " msgstr "Onde está a mídia de origem desse modelo? " diff --git a/po/zh_CN.po b/po/zh_CN.po index caef515..2b6ac17 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -1427,8 +1427,8 @@ msgstr "是" msgid "No" msgstr "否"
-msgid "Define a New Storage Pool" -msgstr "定义一个新的存储池" +msgid "Create a New Storage Pool" +msgstr "" 创建一个新的存储池
msgid "Storage Pool Name" msgstr "存储池名称" @@ -1494,8 +1494,8 @@ msgstr "iSCSI认证" msgid "SCSI Adapter" msgstr "SCSI适配器"
-msgid "Add Template" -msgstr "创建模板" +msgid "Create Template" +msgstr "" 创建模板
msgid "Where is the source media for this template? " msgstr "模板的源介质在哪里?" diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl index 977db66..992a7fa 100644 --- a/ui/pages/storagepool-add.html.tmpl +++ b/ui/pages/storagepool-add.html.tmpl @@ -25,7 +25,7 @@ <body> <div class="window storage-window"> <header> - <h1 class="title">$_("Define a New Storage Pool")</h1> + <h1 class="title">$_("Create a New Storage Pool")</h1> Adam king and royce: I remember we have discussed to use "define" or "create" on storage pool.
<div class="close">X</div> </header> <div class="content"> diff --git a/ui/pages/template-add.html.tmpl b/ui/pages/template-add.html.tmpl index afe22dd..569af77 100644 --- a/ui/pages/template-add.html.tmpl +++ b/ui/pages/template-add.html.tmpl @@ -26,7 +26,7 @@ <body> <div class="window" style="width: 992px;height: 660px;"> <header> - <h1 class="title">$_("Add Template")</h1> + <h1 class="title">$_("Create Template")</h1> <div class="close">X</div> </header> <div class="content" style="margin-bottom: 0">
-- Thanks and best regards! Sheldon Feng(冯少合)<shaohef@linux.vnet.ibm.com> IBM Linux Technology Center

Currently, most modal dialogs use their respective action verb as the main button's labels. For example, the submit button in the dialog "Create network" has the label "Create". But that does not happen consistently in all dialogs. For example, when editing a guest, the dialog's submit button is labeled "Save" instead of "Edit". Change some buttons' labels to reflect their dialog's action verbs. Also, remove the translation entries which are not used anymore. Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com> --- po/en_US.po | 3 --- po/kimchi.pot | 3 --- po/pt_BR.po | 3 --- po/zh_CN.po | 3 --- ui/js/src/kimchi.guest_edit_main.js | 8 ++++---- ui/js/src/kimchi.repository_edit_main.js | 6 +++--- ui/js/src/kimchi.template_edit_main.js | 2 +- ui/pages/guest-edit.html.tmpl | 4 ++-- ui/pages/repository-edit.html.tmpl | 4 ++-- ui/pages/template-edit.html.tmpl | 2 +- 10 files changed, 13 insertions(+), 25 deletions(-) diff --git a/po/en_US.po b/po/en_US.po index 5c3d5d8..485ab25 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -946,9 +946,6 @@ msgstr "Network" msgid "Type" msgstr "Type" -msgid "Save" -msgstr "Save" - msgid "Detach" msgstr "" diff --git a/po/kimchi.pot b/po/kimchi.pot index 89e6567..76f6f8b 100755 --- a/po/kimchi.pot +++ b/po/kimchi.pot @@ -946,9 +946,6 @@ msgstr "" msgid "Type" msgstr "" -msgid "Save" -msgstr "" - msgid "Detach" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index b0058c4..9526973 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -1040,9 +1040,6 @@ msgstr "Redes" msgid "Type" msgstr "Tipo" -msgid "Save" -msgstr "Salvar" - msgid "Detach" msgstr "Remover" diff --git a/po/zh_CN.po b/po/zh_CN.po index 2b6ac17..e39d7a9 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -966,9 +966,6 @@ msgstr "网络" msgid "Type" msgstr "类型" -msgid "Save" -msgstr "保存" - msgid "Detach" msgstr "卸载" diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js index 0236e2d..e5e7698 100644 --- a/ui/js/src/kimchi.guest_edit_main.js +++ b/ui/js/src/kimchi.guest_edit_main.js @@ -30,7 +30,7 @@ kimchi.guest_edit_main = function() { }); var guestEditForm = $('#form-guest-edit-general'); - var saveButton = $('#guest-edit-button-save'); + var submitButton = $('#guest-edit-button'); var refreshCDROMs = function() { kimchi.listVMStorages({ @@ -203,7 +203,7 @@ kimchi.guest_edit_main = function() { kimchi.retrieveVM(kimchi.selectedGuest, initContent); var submitForm = function(event) { - $(saveButton).prop('disabled', true); + $(submitButton).prop('disabled', true); var data=$('#form-guest-edit-general').serializeObject(); if(data['memory']!=undefined) { data['memory'] = Number(data['memory']); @@ -217,12 +217,12 @@ kimchi.guest_edit_main = function() { kimchi.window.close(); }, function(err) { kimchi.message.error(err.responseJSON.reason); - $(saveButton).prop('disabled', false); + $(submitButton).prop('disabled', false); }); event.preventDefault(); }; $(guestEditForm).on('submit', submitForm); - $(saveButton).on('click', submitForm); + $(submitButton).on('click', submitForm); }; diff --git a/ui/js/src/kimchi.repository_edit_main.js b/ui/js/src/kimchi.repository_edit_main.js index 26d6c66..ce45514 100644 --- a/ui/js/src/kimchi.repository_edit_main.js +++ b/ui/js/src/kimchi.repository_edit_main.js @@ -19,7 +19,7 @@ kimchi.repository_edit_main = function() { var editForm = $('#form-repository-edit'); - var saveButton = $('#repository-edit-button-save'); + var submitButton = $('#repository-edit-button'); if(kimchi.host.capabilities['repo_mngt_tool']=="yum") { editForm.find('input.deb').prop('disabled', true); @@ -33,7 +33,7 @@ kimchi.repository_edit_main = function() { $('input', editForm).on('input propertychange', function(event) { if($(this).val() !== '') { - $(saveButton).prop('disabled', false); + $(submitButton).prop('disabled', false); } }); }); @@ -71,5 +71,5 @@ kimchi.repository_edit_main = function() { }; $(editForm).on('submit', editRepository); - $(saveButton).on('click', editRepository); + $(submitButton).on('click', editRepository); }; diff --git a/ui/js/src/kimchi.template_edit_main.js b/ui/js/src/kimchi.template_edit_main.js index f0f4718..8f0a150 100644 --- a/ui/js/src/kimchi.template_edit_main.js +++ b/ui/js/src/kimchi.template_edit_main.js @@ -133,7 +133,7 @@ kimchi.template_edit_main = function() { } }); - $('#tmpl-edit-button-save').on('click', function() { + $('#tmpl-edit-button').on('click', function() { var editableFields = [ 'name', 'cpus', 'memory', 'storagepool', 'disks', 'graphics']; var data = {}; $.each(editableFields, function(i, field) { diff --git a/ui/pages/guest-edit.html.tmpl b/ui/pages/guest-edit.html.tmpl index 96d907e..75ef19d 100644 --- a/ui/pages/guest-edit.html.tmpl +++ b/ui/pages/guest-edit.html.tmpl @@ -116,8 +116,8 @@ </div> <footer> <div id="action-button-container" class="btn-group"> - <button id="guest-edit-button-save" class="btn-normal"> - <span class="text">$_("Save")</span> + <button id="guest-edit-button" class="btn-normal"> + <span class="text">$_("Edit")</span> </button> </div> </footer> diff --git a/ui/pages/repository-edit.html.tmpl b/ui/pages/repository-edit.html.tmpl index fbef4f3..d2dff59 100644 --- a/ui/pages/repository-edit.html.tmpl +++ b/ui/pages/repository-edit.html.tmpl @@ -103,8 +103,8 @@ </div> <footer> <div class="btn-group"> - <button type="submit" id="repository-edit-button-save" class="btn-normal"> - <span class="text">$_("Save")</span> + <button type="submit" id="repository-edit-button" class="btn-normal"> + <span class="text">$_("Edit")</span> </button> </div> </footer> diff --git a/ui/pages/template-edit.html.tmpl b/ui/pages/template-edit.html.tmpl index 434d938..c4fe54a 100644 --- a/ui/pages/template-edit.html.tmpl +++ b/ui/pages/template-edit.html.tmpl @@ -142,7 +142,7 @@ <footer> <div class="btn-group"> <a id="tmpl-edit-button-cancel" class="btn-normal" href="javascript:void(0);"><span class="text">$_("Cancel")</span></a> - <a id="tmpl-edit-button-save" class="btn-normal" href="javascript:void(0);"><span class="text">$_("Save")</span></a> + <a id="tmpl-edit-button" class="btn-normal" href="javascript:void(0);"><span class="text">$_("Edit")</span></a> </div> </footer> </div> -- 1.9.0

On 05/15/2014 04:39 AM, Crístian Viana wrote:
Currently, most modal dialogs use their respective action verb as the main button's labels. For example, the submit button in the dialog "Create network" has the label "Create". But that does not happen consistently in all dialogs. For example, when editing a guest, the dialog's submit button is labeled "Save" instead of "Edit". It's an interesting topic here. Take edit template for example. The flow is: List templates => Select a template to edit by clicking the "*Edit*" Button => Edit template window is open, and user changes some fields. => Click the "*Save*" (Or "Submit") Button to save (or submit) changes.
Notice that "Edit" means the user is about to edit the template, so "Edit'" Button should trigger a pop-up window to allow user to change some fields. And "Save" Button is for saving user's changes to server. So I think it's reasonable to use these 2 labels for these 2 different purposes.
Change some buttons' labels to reflect their dialog's action verbs. Also, remove the translation entries which are not used anymore.
Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com> --- po/en_US.po | 3 --- po/kimchi.pot | 3 --- po/pt_BR.po | 3 --- po/zh_CN.po | 3 --- ui/js/src/kimchi.guest_edit_main.js | 8 ++++---- ui/js/src/kimchi.repository_edit_main.js | 6 +++--- ui/js/src/kimchi.template_edit_main.js | 2 +- ui/pages/guest-edit.html.tmpl | 4 ++-- ui/pages/repository-edit.html.tmpl | 4 ++-- ui/pages/template-edit.html.tmpl | 2 +- 10 files changed, 13 insertions(+), 25 deletions(-)
diff --git a/po/en_US.po b/po/en_US.po index 5c3d5d8..485ab25 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -946,9 +946,6 @@ msgstr "Network" msgid "Type" msgstr "Type"
-msgid "Save" -msgstr "Save" - msgid "Detach" msgstr ""
diff --git a/po/kimchi.pot b/po/kimchi.pot index 89e6567..76f6f8b 100755 --- a/po/kimchi.pot +++ b/po/kimchi.pot @@ -946,9 +946,6 @@ msgstr "" msgid "Type" msgstr ""
-msgid "Save" -msgstr "" - msgid "Detach" msgstr ""
diff --git a/po/pt_BR.po b/po/pt_BR.po index b0058c4..9526973 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -1040,9 +1040,6 @@ msgstr "Redes" msgid "Type" msgstr "Tipo"
-msgid "Save" -msgstr "Salvar" - msgid "Detach" msgstr "Remover"
diff --git a/po/zh_CN.po b/po/zh_CN.po index 2b6ac17..e39d7a9 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -966,9 +966,6 @@ msgstr "网络" msgid "Type" msgstr "类型"
-msgid "Save" -msgstr "保存" - msgid "Detach" msgstr "卸载"
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js index 0236e2d..e5e7698 100644 --- a/ui/js/src/kimchi.guest_edit_main.js +++ b/ui/js/src/kimchi.guest_edit_main.js @@ -30,7 +30,7 @@ kimchi.guest_edit_main = function() { });
var guestEditForm = $('#form-guest-edit-general'); - var saveButton = $('#guest-edit-button-save');
+ var submitButton = $('#guest-edit-button'); Let me explain the naming rule of #guest-edit-button-save. It follows name space style like Java package mechanism. guest-: It's within the scope of guest page edit-: It's within the scope of guest edit window button-: It's a button within the scope of guest edit window save: It's a button named save
So please remain the original ID string of the button. If we will introduce another button in the future, we can simply name it "#guest-edit-button-newid".
var refreshCDROMs = function() { kimchi.listVMStorages({ @@ -203,7 +203,7 @@ kimchi.guest_edit_main = function() { kimchi.retrieveVM(kimchi.selectedGuest, initContent);
var submitForm = function(event) { - $(saveButton).prop('disabled', true); + $(submitButton).prop('disabled', true); var data=$('#form-guest-edit-general').serializeObject(); if(data['memory']!=undefined) { data['memory'] = Number(data['memory']); @@ -217,12 +217,12 @@ kimchi.guest_edit_main = function() { kimchi.window.close(); }, function(err) { kimchi.message.error(err.responseJSON.reason); - $(saveButton).prop('disabled', false); + $(submitButton).prop('disabled', false); });
event.preventDefault(); };
$(guestEditForm).on('submit', submitForm); - $(saveButton).on('click', submitForm); + $(submitButton).on('click', submitForm); }; diff --git a/ui/js/src/kimchi.repository_edit_main.js b/ui/js/src/kimchi.repository_edit_main.js index 26d6c66..ce45514 100644 --- a/ui/js/src/kimchi.repository_edit_main.js +++ b/ui/js/src/kimchi.repository_edit_main.js @@ -19,7 +19,7 @@ kimchi.repository_edit_main = function() {
var editForm = $('#form-repository-edit');
- var saveButton = $('#repository-edit-button-save'); + var submitButton = $('#repository-edit-button');
if(kimchi.host.capabilities['repo_mngt_tool']=="yum") { editForm.find('input.deb').prop('disabled', true); @@ -33,7 +33,7 @@ kimchi.repository_edit_main = function() {
$('input', editForm).on('input propertychange', function(event) { if($(this).val() !== '') { - $(saveButton).prop('disabled', false); + $(submitButton).prop('disabled', false); } }); }); @@ -71,5 +71,5 @@ kimchi.repository_edit_main = function() { };
$(editForm).on('submit', editRepository); - $(saveButton).on('click', editRepository); + $(submitButton).on('click', editRepository); }; diff --git a/ui/js/src/kimchi.template_edit_main.js b/ui/js/src/kimchi.template_edit_main.js index f0f4718..8f0a150 100644 --- a/ui/js/src/kimchi.template_edit_main.js +++ b/ui/js/src/kimchi.template_edit_main.js @@ -133,7 +133,7 @@ kimchi.template_edit_main = function() { } });
- $('#tmpl-edit-button-save').on('click', function() { + $('#tmpl-edit-button').on('click', function() { var editableFields = [ 'name', 'cpus', 'memory', 'storagepool', 'disks', 'graphics']; var data = {}; $.each(editableFields, function(i, field) { diff --git a/ui/pages/guest-edit.html.tmpl b/ui/pages/guest-edit.html.tmpl index 96d907e..75ef19d 100644 --- a/ui/pages/guest-edit.html.tmpl +++ b/ui/pages/guest-edit.html.tmpl @@ -116,8 +116,8 @@ </div> <footer> <div id="action-button-container" class="btn-group"> - <button id="guest-edit-button-save" class="btn-normal"> - <span class="text">$_("Save")</span> + <button id="guest-edit-button" class="btn-normal"> + <span class="text">$_("Edit")</span> </button> </div> </footer> diff --git a/ui/pages/repository-edit.html.tmpl b/ui/pages/repository-edit.html.tmpl index fbef4f3..d2dff59 100644 --- a/ui/pages/repository-edit.html.tmpl +++ b/ui/pages/repository-edit.html.tmpl @@ -103,8 +103,8 @@ </div> <footer> <div class="btn-group"> - <button type="submit" id="repository-edit-button-save" class="btn-normal"> - <span class="text">$_("Save")</span> + <button type="submit" id="repository-edit-button" class="btn-normal"> + <span class="text">$_("Edit")</span> </button> </div> </footer> diff --git a/ui/pages/template-edit.html.tmpl b/ui/pages/template-edit.html.tmpl index 434d938..c4fe54a 100644 --- a/ui/pages/template-edit.html.tmpl +++ b/ui/pages/template-edit.html.tmpl @@ -142,7 +142,7 @@ <footer> <div class="btn-group"> <a id="tmpl-edit-button-cancel" class="btn-normal" href="javascript:void(0);"><span class="text">$_("Cancel")</span></a> - <a id="tmpl-edit-button-save" class="btn-normal" href="javascript:void(0);"><span class="text">$_("Save")</span></a> + <a id="tmpl-edit-button" class="btn-normal" href="javascript:void(0);"><span class="text">$_("Edit")</span></a> </div> </footer> </div>

On 05/14/2014 05:39 PM, Crístian Viana wrote:
Crístian Viana (3): Add missing closing quote in HTML code Use the verb "Create" in all create operations Use action verb as the main button's label
po/en_US.po | 11 ++++------- po/kimchi.pot | 7 ++----- po/pt_BR.po | 11 ++++------- po/zh_CN.po | 11 ++++------- ui/js/src/kimchi.guest_edit_main.js | 8 ++++---- ui/js/src/kimchi.repository_edit_main.js | 6 +++--- ui/js/src/kimchi.template_edit_main.js | 2 +- ui/pages/guest-edit.html.tmpl | 4 ++-- ui/pages/repository-edit.html.tmpl | 4 ++-- ui/pages/storagepool-add.html.tmpl | 2 +- ui/pages/template-add.html.tmpl | 2 +- ui/pages/template-edit.html.tmpl | 2 +- 12 files changed, 29 insertions(+), 41 deletions(-)
I can't apply this patch set. Needs rebase.
participants (4)
-
Aline Manera
-
Crístian Viana
-
Hongliang Wang
-
Sheldon