From e81c9490b0c04555723497bad914d423249197ae Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Wed, 25 Sep 2013 15:15:28 +0200 Subject: [PATCH] // Advanced parameters bootstrap design --- .../controllers/backup/download/view.tpl | 22 ++++---- .../backup/helpers/list/list_header.tpl | 31 ++++++------ .../controllers/backup/helpers/view/view.tpl | 12 ++--- .../request_sql/helpers/form/form.tpl | 50 +++++++++++-------- .../request_sql/helpers/view/view.tpl | 13 ++--- .../request_sql/list_action_export.tpl | 5 +- controllers/admin/AdminBackupController.php | 8 +-- controllers/admin/AdminEmailsController.php | 4 +- .../admin/AdminRequestSqlController.php | 13 ++--- js/sendMailTest.js | 10 ++-- 10 files changed, 84 insertions(+), 84 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/backup/download/view.tpl b/admin-dev/themes/default/template/controllers/backup/download/view.tpl index 8137754ed..aab9ce685 100644 --- a/admin-dev/themes/default/template/controllers/backup/download/view.tpl +++ b/admin-dev/themes/default/template/controllers/backup/download/view.tpl @@ -26,20 +26,16 @@ {extends file="helpers/view/view.tpl"} {block name="override_tpl"} -
-

- - {l s='Download'} -

-

- - - {l s='Download the backup file'} ({$backup_weight}{l s='MB'}) - -

-

{l s='Tip: You can also download this file over to your FTP. Backup files are located in the "admin/backups" directory.'}

-
+

{l s='Download'}

+

+ + + {l s='Download the backup file'} ({$backup_weight}{l s='MB'}) + +

+

{l s='Tip: You can also download this file over to your FTP. Backup files are located in the "admin/backups" directory.'}

+
diff --git a/admin-dev/themes/default/template/controllers/backup/helpers/list/list_header.tpl b/admin-dev/themes/default/template/controllers/backup/helpers/list/list_header.tpl index d747abd46..56da6ba26 100644 --- a/admin-dev/themes/default/template/controllers/backup/helpers/list/list_header.tpl +++ b/admin-dev/themes/default/template/controllers/backup/helpers/list/list_header.tpl @@ -28,22 +28,19 @@ {block name="override_header"} {if isset($backup_url) && isset($backup_weight)} -
-

- - {l s='Download'} -

-

- - - {l s='Download the backup file'} ({$backup_weight}{l s='MB'}) - -

-

{l s='Tip: You can also download this file over to your FTP. Backup files are located in the "admin/backups" directory.'}

-
+
+

{l s='Download'}

+

+ + + {l s='Download the backup file'} ({$backup_weight}{l s='MB'}) + +

+

{l s='Tip: You can also download this file over to your FTP. Backup files are located in the "admin/backups" directory.'}

+
{/if} -
+

{l s='Disclaimer before creating a new backup'}

@@ -65,9 +62,9 @@
-
-
+ +

{l s='How to restore a database backup in 10 easy steps:'}

    @@ -83,6 +80,6 @@
  1. {l s='Click on the "Go" button and please wait patiently for the import process to conclude. This may take several minutes.'}
-
+ {/block} \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/backup/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/backup/helpers/view/view.tpl index 1c5f42fb8..2e5459808 100644 --- a/admin-dev/themes/default/template/controllers/backup/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/backup/helpers/view/view.tpl @@ -26,15 +26,13 @@ {extends file="helpers/view/view.tpl"} {block name="override_tpl"} - -
{l s='Beginning the download ...'}
- +
+

{l s='Download'}

+
{l s='Beginning the download ...'}

{l s='Backup files should automatically download.'}

- -

{l s='If not,'} {l s='please click here!'}

- +

{l s='If not,'} {l s='please click here!'}

- +
{/block} diff --git a/admin-dev/themes/default/template/controllers/request_sql/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/request_sql/helpers/form/form.tpl index 41a4a1c65..6695b0b89 100644 --- a/admin-dev/themes/default/template/controllers/request_sql/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/request_sql/helpers/form/form.tpl @@ -26,22 +26,32 @@ {extends file="helpers/form/form.tpl"} {block name="after"} - -
-

- - {l s='List of MySQL Tables:'} -

-
- - -
-
-
+
+
+
+

{l s='List of MySQL Tables'}

+
+ +
+
+ +
+
+
+
+
+

{l s='List of tables attributes'}

+
+
{l s='Please choose a MySQL table'}
+
+
+
+
+ {/block} {block name="script"} @@ -66,9 +76,9 @@ var html = ""; html += ""; html += ""; - html += ""; - html += ""; - html += ""; + html += ""; + html += ""; + html += ""; html += ""; html += ""; html += ""; @@ -77,7 +87,7 @@ html += ""; html += ""; html += ""; - html += ""; + html += ""; html += ""; } html += ""; diff --git a/admin-dev/themes/default/template/controllers/request_sql/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/request_sql/helpers/view/view.tpl index a90477821..aaf8ed2bf 100644 --- a/admin-dev/themes/default/template/controllers/request_sql/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/request_sql/helpers/view/view.tpl @@ -26,15 +26,16 @@ {extends file="helpers/view/view.tpl"} {block name="override_tpl"} +
+

{l s='Request result'}

{if isset($view['error'])} -

{l s='This query has no result.'}

+
{l s='This request has no result.'}
{else} -

{$view['name']}

-
{l s='Attribute'}{l s='Type'}{l s='Action'}{l s='Attribute'}{l s='Type'}{l s='Action'}
"+data[i].Field+""+data[i].Type+"
+
{foreach $view['key'] AS $key} - + {/foreach} @@ -62,5 +63,5 @@ }); {/if} -{/block} - + +{/block} \ No newline at end of file diff --git a/admin-dev/themes/default/template/controllers/request_sql/list_action_export.tpl b/admin-dev/themes/default/template/controllers/request_sql/list_action_export.tpl index 875c47dee..096d32434 100644 --- a/admin-dev/themes/default/template/controllers/request_sql/list_action_export.tpl +++ b/admin-dev/themes/default/template/controllers/request_sql/list_action_export.tpl @@ -22,7 +22,6 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - - - {$action} + + {$action} \ No newline at end of file diff --git a/controllers/admin/AdminBackupController.php b/controllers/admin/AdminBackupController.php index b51fce32f..49156be30 100644 --- a/controllers/admin/AdminBackupController.php +++ b/controllers/admin/AdminBackupController.php @@ -38,13 +38,13 @@ class AdminBackupControllerCore extends AdminController parent::__construct(); $this->fields_list = array ( - 'date' => array('title' => $this->l('Date'), 'type' => 'datetime', 'width' => 120, 'align' => 'right'), + 'date' => array('title' => $this->l('Date'), 'type' => 'datetime'), 'age' => array('title' => $this->l('Age')), - 'filename' => array('title' => $this->l('File name'), 'width' => 200), - 'filesize' => array('title' => $this->l('File size')) + 'filename' => array('title' => $this->l('File name')), + 'filesize' => array('title' => $this->l('File size'), 'class' => 'fixed-width-sm') ); - $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'))); + $this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'), 'icon' => 'icon-trash')); $this->fields_options = array( 'general' => array( diff --git a/controllers/admin/AdminEmailsController.php b/controllers/admin/AdminEmailsController.php index f9a6e8075..651e11e84 100644 --- a/controllers/admin/AdminEmailsController.php +++ b/controllers/admin/AdminEmailsController.php @@ -40,7 +40,7 @@ class AdminEmailsControllerCore extends AdminController $this->fields_options = array( 'email' => array( 'title' => $this->l('Email'), - 'icon' => 'email', + 'icon' => 'icon-envelope', 'fields' => array( 'PS_MAIL_EMAIL_MESSAGE' => array( 'title' => $this->l('Send email to'), @@ -78,7 +78,6 @@ class AdminEmailsControllerCore extends AdminController ), 'smtp' => array( 'title' => $this->l('Email'), - 'icon' => 'email', 'top' => '
', 'bottom' => '
', 'fields' => array( @@ -147,7 +146,6 @@ class AdminEmailsControllerCore extends AdminController ), 'test' => array( 'title' => $this->l('Test your email configuration'), - 'icon' => 'email', 'fields' => array( 'PS_SHOP_EMAIL' => array( 'title' => $this->l('Send a test email to'), diff --git a/controllers/admin/AdminRequestSqlController.php b/controllers/admin/AdminRequestSqlController.php index b08573c50..85b93fcb5 100644 --- a/controllers/admin/AdminRequestSqlController.php +++ b/controllers/admin/AdminRequestSqlController.php @@ -45,9 +45,9 @@ class AdminRequestSqlControllerCore extends AdminController $this->context = Context::getContext(); $this->fields_list = array( - 'id_request_sql' => array('title' => $this->l('ID'), 'width' => 25), - 'name' => array('title' => $this->l('Name'), 'width' => 300), - 'sql' => array('title' => $this->l('Request'), 'width' => 500) + 'id_request_sql' => array('title' => $this->l('ID'), 'class' => 'fixed-width-xs'), + 'name' => array('title' => $this->l('Name')), + 'sql' => array('title' => $this->l('Request')) ); $this->fields_options = array( @@ -95,8 +95,6 @@ class AdminRequestSqlControllerCore extends AdminController if ($this->display == 'options') unset($this->toolbar_btn['new']); - else - unset($this->toolbar_btn['save']); } public function renderList() @@ -127,7 +125,8 @@ class AdminRequestSqlControllerCore extends AdminController { $this->fields_form = array( 'legend' => array( - 'title' => $this->l('Request') + 'title' => $this->l('Request'), + 'icon' => 'icon-cog' ), 'input' => array( array( @@ -212,6 +211,8 @@ class AdminRequestSqlControllerCore extends AdminController $view['key'] = $tab_key; $view['results'] = $results; + $this->toolbar_title = $obj->name; + $request_sql = new RequestSql(); $view['attributes'] = $request_sql->attributes; } diff --git a/js/sendMailTest.js b/js/sendMailTest.js index f46a6542d..b14727067 100644 --- a/js/sendMailTest.js +++ b/js/sendMailTest.js @@ -28,18 +28,18 @@ verifMailREGEX = /^([\w+-]+(?:\.[\w+-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{ function verifyMail(testMsg, testSubject) { - $("#mailResultCheck").removeClass("ok").removeClass('fail').html(''); + $("#mailResultCheck").removeClass("alert-danger").removeClass('alert-success').html(''); $("#mailResultCheck").slideDown("slow"); //local verifications if ($("#testEmail[value=]").length > 0) { - $("#mailResultCheck").addClass("fail").removeClass("ok").removeClass('userInfos').html(errorMail); + $("#mailResultCheck").addClass("alert-danger").removeClass("alert-success").removeClass('userInfos').html(errorMail); return false; } else if (!verifMailREGEX.test( $("#testEmail").val() )) { - $("#mailResultCheck").addClass("fail").removeClass("ok").removeClass('userInfos').html(errorMail); + $("#mailResultCheck").addClass("alert-danger").removeClass("alert-success").removeClass('userInfos').html(errorMail); return false; } else @@ -70,13 +70,13 @@ function verifyMail(testMsg, testSubject) { if (ret == "ok") { - $("#mailResultCheck").addClass("ok").removeClass("fail").removeClass('userInfos').html(textSendOk); + $("#mailResultCheck").addClass("alert-success").removeClass("alert-danger").removeClass('userInfos').html(textSendOk); mailIsOk = true; } else { mailIsOk = false; - $("#mailResultCheck").addClass("fail").removeClass("ok").removeClass('userInfos').html(textSendError + '
' + ret); + $("#mailResultCheck").addClass("alert-success").removeClass("alert-danger").removeClass('userInfos').html(textSendError + '
' + ret); } } }
{$key}{$key}