// Advanced parameters bootstrap design

This commit is contained in:
Jerome Nadaud
2013-09-25 15:15:28 +02:00
parent 439700f46a
commit e81c9490b0
10 changed files with 84 additions and 84 deletions
@@ -26,20 +26,16 @@
{extends file="helpers/view/view.tpl"}
{block name="override_tpl"}
<fieldset>
<h3>
<i class="icon-download"></i>
{l s='Download'}
</h3>
<p>
<a class="btn btn-default" href="{$backup_url}">
<i class="icon-download"></i>
{l s='Download the backup file'} ({$backup_weight}{l s='MB'})
</a>
</p>
<p>{l s='Tip: You can also download this file over to your FTP. Backup files are located in the "admin/backups" directory.'}</p>
</fieldset>
<h3><i class="icon-download"></i> {l s='Download'}</h3>
<p>
<a class="btn btn-default" href="{$backup_url}">
<i class="icon-download"></i>
{l s='Download the backup file'} ({$backup_weight}{l s='MB'})
</a>
</p>
<p>{l s='Tip: You can also download this file over to your FTP. Backup files are located in the "admin/backups" directory.'}</p>
</fieldset>
<div class="row">
<div class="alert alert-warning">
@@ -28,22 +28,19 @@
{block name="override_header"}
{if isset($backup_url) && isset($backup_weight)}
<fieldset>
<h3>
<i class="icon-download"></i>
{l s='Download'}
</h3>
<p>
<a class="btn btn-default" href="{$backup_url}">
<i class="icon-download"></i>
{l s='Download the backup file'} ({$backup_weight}{l s='MB'})
</a>
</p>
<p>{l s='Tip: You can also download this file over to your FTP. Backup files are located in the "admin/backups" directory.'}</p>
</fieldset>
<fieldset>
<h3><i class="icon-download"></i> {l s='Download'}</h3>
<p>
<a class="btn btn-default" href="{$backup_url}">
<i class="icon-download"></i>
{l s='Download the backup file'} ({$backup_weight}{l s='MB'})
</a>
</p>
<p>{l s='Tip: You can also download this file over to your FTP. Backup files are located in the "admin/backups" directory.'}</p>
</fieldset>
{/if}
<div class="row">
<div class="alert alert-warning">
<button data-dismiss="alert" class="close" type="button">×</button>
<p>{l s='Disclaimer before creating a new backup'}</p>
@@ -65,9 +62,9 @@
</button>
</form>
</div>
</div>
<div class="row">
<div class="alert alert-info">
<p>{l s='How to restore a database backup in 10 easy steps:'}</p>
<ol>
@@ -83,6 +80,6 @@
<li>{l s='Click on the "Go" button and please wait patiently for the import process to conclude. This may take several minutes.'}</li>
</ol>
</div>
</div>
{/block}
@@ -26,15 +26,13 @@
{extends file="helpers/view/view.tpl"}
{block name="override_tpl"}
<div class="alert">{l s='Beginning the download ...'}</div>
<fieldset>
<h3><i class="icon-download"></i> {l s='Download'}</h3>
<div class="alert alert-success">{l s='Beginning the download ...'}</div>
<p>{l s='Backup files should automatically download.'}</p>
<p>{l s='If not,'} <b><a href="{$url_backup}">{l s='please click here!'}</a></b></p>
<p>{l s='If not,'} <b><a href="{$url_backup}" class="btn btn-default"><i class="icon-download"></i> {l s='please click here!'}</a></b></p>
<iframe width="0" height="0" scrolling="no" frameborder="0" src="{$url_backup}"></iframe>
</fieldset>
{/block}
@@ -26,22 +26,32 @@
{extends file="helpers/form/form.tpl"}
{block name="after"}
<fieldset>
<h3>
<i class="icon-list"></i>
{l s='List of MySQL Tables:'}
</h3>
<div id="selectTables">
<select id="table" size="10">
{foreach $tables as $table}
<option value="{$table}">{$table}</option>
{/foreach}
</select>
<input type="button" id="add_table" value="{l s='Add table'}" />
</div>
<div id="listAttributes"></div>
</fieldset>
<div class="row">
<div class="col-lg-3">
<fieldset>
<h3><i class="icon-list"></i> {l s='List of MySQL Tables'}</h3>
<div class="row" id="selectTables">
<select id="table" size="10">
{foreach $tables as $table}
<option value="{$table}">{$table}</option>
{/foreach}
</select>
</div>
<div class="row">
<button type="button" id="add_table" class="btn btn-default">{l s='Add table'}</button>
</div>
</fieldset>
</div>
<div class="col-lg-9">
<fieldset>
<h3><i class="icon-list"></i> {l s='List of tables attributes'}</h3>
<div id="listAttributes">
<div class="alert alert-warning">{l s='Please choose a MySQL table'}</div>
</div>
</fieldset>
</div>
</div>
{/block}
{block name="script"}
@@ -66,9 +76,9 @@
var html = "<table class='table'>";
html += "<thead>";
html += "<tr>";
html += "<th>{l s='Attribute'}</th>";
html += "<th>{l s='Type'}</th>";
html += "<th>{l s='Action'}</th>";
html += "<th><span class=\"title_box\">{l s='Attribute'}</span></th>";
html += "<th class=\"fixed-width-md\"><span class=\"title_box\">{l s='Type'}</span></th>";
html += "<th class=\"fixed-width-md\"><span class=\"title_box\">{l s='Action'}</span></th>";
html += "</tr>";
html += "</thead>";
html += "<tbody>";
@@ -77,7 +87,7 @@
html += "<tr>";
html += "<td>"+data[i].Field+"</td>";
html += "<td>"+data[i].Type+"</td>";
html += "<td><input type=\"button\" class=\"add_attribute\" value=\"{l s='Add attribute'}\" onclick=\"javascript:AddRequestSql('"+data[i].Field+"');\"/></td>";
html += "<td><button type=\"button\" class=\"btn btn-default\" onclick=\"javascript:AddRequestSql('"+data[i].Field+"');\">{l s='Add attribute'}</button></td>";
html += "</tr>";
}
html += "</tbody>";
@@ -26,15 +26,16 @@
{extends file="helpers/view/view.tpl"}
{block name="override_tpl"}
<fieldset>
<h3><i class="icon-cog"></i> {l s='Request result'}</h3>
{if isset($view['error'])}
<p>{l s='This query has no result.'}</p>
<div class="alert alert-warning">{l s='This request has no result.'}</div>
{else}
<h2>{$view['name']}</h2>
<table cellpadding="0" cellspacing="0" class="table" id="viewRequestSql">
<table class="table" id="viewRequestSql">
<thead>
<tr>
{foreach $view['key'] AS $key}
<th align="center">{$key}</th>
<th><span class="title_box">{$key}</span></th>
{/foreach}
</tr>
</thead>
@@ -62,5 +63,5 @@
});
</script>
{/if}
{/block}
</fieldset>
{/block}
@@ -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
*}
<a href="{$href}">
<i class="icon-upload"></i>
{$action}
<a href="{$href}" title="{$action}" class="btn btn-default">
<i class="icon-cloud-upload"></i> {$action}
</a>
+4 -4
View File
@@ -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(
+1 -3
View File
@@ -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' => '<div id="smtp" style="display: '.((Configuration::get('PS_MAIL_METHOD') == 2) ? 'block' : 'none').';">',
'bottom' => '</div>',
'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'),
@@ -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;
}
+5 -5
View File
@@ -28,18 +28,18 @@ verifMailREGEX = /^([\w+-]+(?:\.[\w+-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{
function verifyMail(testMsg, testSubject)
{
$("#mailResultCheck").removeClass("ok").removeClass('fail').html('<img src="../img/admin/ajax-loader.gif" alt="" />');
$("#mailResultCheck").removeClass("alert-danger").removeClass('alert-success').html('<img src="../img/admin/ajax-loader.gif" alt="" />');
$("#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 + '<br />' + ret);
$("#mailResultCheck").addClass("alert-success").removeClass("alert-danger").removeClass('userInfos').html(textSendError + '<br />' + ret);
}
}
}