From f82ffe92ce7168885990aace35c91706da7a7f2a Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 1 Aug 2013 13:27:05 +0200 Subject: [PATCH] Pflichtenhefte: Verwendung von jQuery-UI-Dialogen anstelle von jqModal --- SL/Controller/RequirementSpecVersion.pm | 4 ++-- js/locale/de.js | 2 ++ js/requirement_spec.js | 12 ++++++------ .../requirement_spec/select_template_to_paste.html | 7 ++----- .../webpages/requirement_spec_version/_form.html | 2 +- templates/webpages/requirement_spec_version/new.html | 2 -- 6 files changed, 13 insertions(+), 16 deletions(-) diff --git a/SL/Controller/RequirementSpecVersion.pm b/SL/Controller/RequirementSpecVersion.pm index 1a4557e9b..9258698e8 100644 --- a/SL/Controller/RequirementSpecVersion.pm +++ b/SL/Controller/RequirementSpecVersion.pm @@ -60,7 +60,7 @@ sub action_new { $self->version->description(@lines ? join("\n", @lines) : t8('No changes since previous version.')); } - $self->render('requirement_spec_version/new', { layout => 0 }, title => t8('Create a new version')); + $self->render('requirement_spec_version/new', { layout => 0 }); } sub action_create { @@ -85,7 +85,7 @@ sub action_create { $self->js ->html('#requirement_spec_version', $version_info_html) ->html('#versioned_copies_list', $version_list_html) - ->jqmClose('.jqmWindow') + ->dialog->close('#jqueryui_popup_dialog') ->render($self); } diff --git a/js/locale/de.js b/js/locale/de.js index 31831879b..da287e6e0 100644 --- a/js/locale/de.js +++ b/js/locale/de.js @@ -12,6 +12,7 @@ namespace("kivi").setupLocale({ "Copy template":"Vorlage kopieren", "Create":"Anlegen", "Create PDF":"PDF erzeugen", +"Create a new version":"Eine neue Version anlegen", "Create new quotation/order":"Neues Angebot/neuen Auftrag anlegen", "Create new qutoation/order":"Neues Angebot/neuen Auftrag anlegen", "Create new version":"Neue Version anlegen", @@ -41,6 +42,7 @@ namespace("kivi").setupLocale({ "Revert to version":"Auf Version zurücksetzen", "Save":"Speichern", "Section/Function block actions":"Abschnitts-/Funktionsblockaktionen", +"Select template to paste":"Einzufügende Vorlage auswählen", "Text block actions":"Textblockaktionen", "The description is missing.":"Die Beschreibung fehlt.", "The name is missing.":"Der Name fehlt.", diff --git a/js/requirement_spec.js b/js/requirement_spec.js index 094665513..e059e8400 100644 --- a/js/requirement_spec.js +++ b/js/requirement_spec.js @@ -281,11 +281,11 @@ ns.item_popup_menu_hidden = function(opt) { // ------------------------------------------------------------------------- ns.paste_template = function(key, opt, other_data) { - open_jqm_window({ url: 'controller.pl?action=RequirementSpec/select_template_to_paste' }); + kivi.popup_dialog({ url: 'controller.pl?action=RequirementSpec/select_template_to_paste', dialog: { title: kivi.t8("Select template to paste") } }); }; ns.paste_selected_template = function(template_id) { - $('#jqm_popup_dialog').jqmClose(); + $('#jqueryui_popup_dialog').dialog("close"); var data = { action: "RequirementSpec/paste_template", @@ -459,10 +459,10 @@ ns.disable_versioned_copy_item_commands = function(key, opt) { }; ns.create_version = function() { - open_jqm_window({ url: 'controller.pl', - data: { action: 'RequirementSpecVersion/new', - requirement_spec_id: $('#requirement_spec_id').val() }, - id: 'new_requirement_spec_version_window' }); + kivi.popup_dialog({ url: 'controller.pl', + data: { action: 'RequirementSpecVersion/new', + requirement_spec_id: $('#requirement_spec_id').val() }, + dialog: { title: kivi.t8('Create a new version') }}); return true; }; diff --git a/templates/webpages/requirement_spec/select_template_to_paste.html b/templates/webpages/requirement_spec/select_template_to_paste.html index f73441b4f..02d5a3649 100644 --- a/templates/webpages/requirement_spec/select_template_to_paste.html +++ b/templates/webpages/requirement_spec/select_template_to_paste.html @@ -12,13 +12,9 @@ [%- END %] [%- END %] -

[%- LxERP.t8("Select template to paste") %]

- [%- IF !TEMPLATES.size %]

[%- LxERP.t8("No requirement spec templates have been created yet.") %]

-

[%- LxERP.t8("Abort") %]

- [%- ELSE %] @@ -68,5 +64,6 @@ [%- END %]
-

[%- LxERP.t8("Abort") %]

[%- END %] + +

[%- LxERP.t8("Abort") %]

diff --git a/templates/webpages/requirement_spec_version/_form.html b/templates/webpages/requirement_spec_version/_form.html index a100c3383..6d312a942 100644 --- a/templates/webpages/requirement_spec_version/_form.html +++ b/templates/webpages/requirement_spec_version/_form.html @@ -30,7 +30,7 @@ [%- LxERP.t8("Cancel") %] [%- ELSE %] [% L.ajax_submit_tag("controller.pl?action=RequirementSpecVersion/create", "#" _ id_prefix, LxERP.t8("Save")) %] - [% LxERP.t8("Cancel") %] + [% LxERP.t8("Cancel") %] [%- END %]

diff --git a/templates/webpages/requirement_spec_version/new.html b/templates/webpages/requirement_spec_version/new.html index ebcca876c..ff53b7a7f 100644 --- a/templates/webpages/requirement_spec_version/new.html +++ b/templates/webpages/requirement_spec_version/new.html @@ -1,5 +1,3 @@ -

[% title %]

- [%- INCLUDE 'common/flash.html' %] [%- INCLUDE 'requirement_spec_version/_form.html' %] -- 2.20.1