Filebox UI cleaning.

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11956 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ChanMyeong 2012-10-29 10:12:53 +00:00
parent 05ed545650
commit 1d1a3b6083
5 changed files with 51 additions and 98 deletions

View file

@ -83,7 +83,6 @@ jQuery(function($){
$('.x .x_tab-content>.x_tab-pane:not(".x_active")').hide();
}
$('.x .x_tabbable').xeTabbable();
$(document.body).on('click', '.x .x_nav-tabs>li>a[href*="#"]', function(){
var $this = $(this);
$this.parent('li').addClass('x_active').siblings().removeClass('x_active');
@ -161,7 +160,6 @@ jQuery(function($){
$('.x th>input[type="checkbox"]')
.change(function() {
var $this = $(this), name = $this.data('name');
$this.closest('table')
.find('input:checkbox')
.filter(function(){
@ -178,21 +176,23 @@ jQuery(function($){
return false;
});
// Section Toggle
var $section_heading = $('.x .section').find('>h1:first');
$section_heading.append('<button type="button" class="snToggle x_icon-chevron-up">Toggle this section</button>');
$('.x .section.collapse>h1>.snToggle').removeClass('x_icon-chevron-up').addClass('x_icon-chevron-down');
$section_heading.find('>.snToggle').click(function(){
var $this = $(this);
var $section = $this.closest('.section');
if(!$section.hasClass('collapse')){
$section.addClass('collapse').children('h1:first').siblings().hide();
$this.removeClass('x_icon-chevron-up').addClass('x_icon-chevron-down');
} else {
$section.removeClass('collapse').children('h1:first').siblings().show();
$this.removeClass('x_icon-chevron-down').addClass('x_icon-chevron-up');
}
reflow();
});
if($('.section').length > 1){
var $section_heading = $('.x .section').find('>h1:first');
$section_heading.append('<button type="button" class="snToggle x_icon-chevron-up">Toggle this section</button>');
$('.x .section.collapse>h1>.snToggle').removeClass('x_icon-chevron-up').addClass('x_icon-chevron-down');
$section_heading.find('>.snToggle').click(function(){
var $this = $(this);
var $section = $this.closest('.section');
if(!$section.hasClass('collapse')){
$section.addClass('collapse').children('h1:first').siblings().hide();
$this.removeClass('x_icon-chevron-up').addClass('x_icon-chevron-down');
} else {
$section.removeClass('collapse').children('h1:first').siblings().show();
$this.removeClass('x_icon-chevron-down').addClass('x_icon-chevron-up');
}
reflow();
});
}
// Alert Closer
var $xAlert = $('.x .x_alert');
$xAlert.prepend('<button type="button" class="x_close">&times;</button>');

File diff suppressed because one or more lines are too long

View file

@ -14,47 +14,47 @@
<div class="x_controls">
<label class="x_inline"><input type="radio" name="allow_outlink" id="allow_outlink_y" value="Y" checked="checked"|cond="$config->allow_outlink == 'Y'" /> {$lang->cmd_yes}</label>
<label class="x_inline"><input type="radio" name="allow_outlink" value="N" checked="checked"|cond="$config->allow_outlink == 'N'" /> {$lang->cmd_no}</label>
<span class="x_help-block">{$lang->about_allow_outlink}</span>
<p class="x_help-block">{$lang->about_allow_outlink}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="allow_outlink_format">{$lang->allow_outlink_format}</label>
<div class="x_controls">
<input type="text" name="allow_outlink_format" id="allow_outlink_format" value="{$config->allow_outlink_format}" />
<span class="x_help-block">{$lang->about_allow_outlink_format}</span>
<p class="x_help-inline">{$lang->about_allow_outlink_format}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="allow_outlink_site">{$lang->allow_outlink_site}</label>
<div class="x_controls">
<textarea name="allow_outlink_site" id="allow_outlink_site" rows="8" cols="42">{$config->allow_outlink_site}</textarea>
<span class="x_help-block">{$lang->about_allow_outlink_site}</span>
<textarea name="allow_outlink_site" id="allow_outlink_site" rows="4" cols="42">{$config->allow_outlink_site}</textarea>
<p class="x_help-inline">{$lang->about_allow_outlink_site}</p>
</div>
</div>
<div class="x_control-group">
<label for="filesize" class="x_control-label">{$lang->allowed_filesize}</label>
<div class="x_controls">
<input id="filesize" type="text" name="allowed_filesize" value="{$config->allowed_filesize}" style="width:40px" /> MB / {ini_get('upload_max_filesize')}
<span class="x_help-block">{$lang->about_allowed_filesize}</span>
<p class="x_help-inline">{$lang->about_allowed_filesize}</p>
</div>
</div>
<div class="x_control-group">
<label for="attachSize" class="x_control-label">{$lang->allowed_attach_size}</label>
<div class="x_controls">
<input id="attachSize" type="text" name="allowed_attach_size" value="{$config->allowed_attach_size}" style="width:40px" /> MB
<span class="x_help-block">{$lang->about_allowed_attach_size}</span>
<p class="x_help-inline">{$lang->about_allowed_attach_size}</p>
</div>
</div>
<div class="x_control-group">
<label for="allowedFiletypes" class="x_control-label">{$lang->allowed_filetypes}</label>
<div class="x_controls">
<input id="allowedFiletypes" type="text" name="allowed_filetypes" value="{$config->allowed_filetypes}" />
<span class="x_help-block">{$lang->about_allowed_filetypes}</span>
<p class="x_help-inline">{$lang->about_allowed_filetypes}</p>
</div>
</div>
<div class="x_clearfix btnArea">
<div class="x_pull-right">
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>
<button type="submit" class="x_btn x_btn-primary x_btn-large">{$lang->cmd_save}</button>
</div>
</div>
</form>

View file

@ -331,6 +331,10 @@
<value xml:lang="en"><![CDATA[Upload File]]></value>
<value xml:lang="zh-TW"><![CDATA[上傳檔案]]></value>
</item>
<item name="filebox_list">
<value xml:lang="ko"><![CDATA[파일 목록]]></value>
<value xml:lang="en"><![CDATA[File List]]></value>
</item>
<item name="access_type">
<value xml:lang="ko"><![CDATA[접속 방법]]></value>
<value xml:lang="en"><![CDATA[Access Type]]></value>

View file

@ -7,23 +7,24 @@
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<section>
<h2>{$lang->upload_file}</h2>
<section class="section">
<h1>{$lang->upload_file}</h1>
<form action="./" class="x_form-horizontal" method="post" enctype="multipart/form-data">
<input type="hidden" name="module" value="module" />
<input type="hidden" name="act" value="procModuleFileBoxAdd" />
<input type="hidden" name="vid" value="{$vid}" />
<input type="hidden" name="filter" value="{$filter}" />
<input type="hidden" name="input" value="{$input}" />
<div class="x_control-group __attribute" data-count="1">
<label for="attribute_name1" class="x_control-label __attribute_name_label">{$lang->attribute_name}</label>
<div class="x_controls">
<input type="text" name="attribute_name[]" id="attribute_name1" class="__attribute_name" />
<label for="attribute_value1" class="x_inline __attribute_value_label">{$lang->attribute_value} <input type="text" name="attribute_value[]" id="attribute_value1" class="__attribute_value" /></label>
<button type="button" class="x_btn x_btn-mini __addBtn" onclick="addRow('fileUp');">{$lang->cmd_add}</button>
<button type="button" class="x_btn x_btn-mini __deleteBtn" onclick="clearRow(this);">{$lang->cmd_delete}</button>
<input type="text" name="attribute_name[]" id="attribute_name1" class="__attribute_name" style="margin-right:20px" />
<label for="attribute_value1" class="x_inline __attribute_value_label">{$lang->attribute_value}</label>
<input type="text" name="attribute_value[]" id="attribute_value1" class="__attribute_value" style="margin-right:20px" />
<span class="x_btn-group">
<button type="button" class="x_btn __addBtn" onclick="addRow('fileUp');">{$lang->cmd_add}</button>
<button type="button" class="x_btn __deleteBtn" onclick="clearRow(this);">{$lang->cmd_delete}</button>
</span>
</div>
</div>
<div class="x_control-group">
@ -38,11 +39,16 @@
</form>
</section>
<section>
<section class="section">
<h1>{$lang->filebox_list}</h1>
<table class="x_table x_table-striped x_table-hover">
<col style="width:250px" />
<col />
<col style="width:50px; white-space:nowrap" />
<thead>
<tr>
<th scope="col">{$lang->file}</th>
<th scope="col">{$lang->attribute_name}:{$lang->attribute_value}</th>
<th scope="col">{$lang->cmd_delete}</th>
</tr>
</thead>
<tbody>
<tr loop="$filebox_list => $key, $val">
<td>
@ -55,16 +61,16 @@
<embed height="100" width="100" wmode="transparent" flashvars="" autostart="false" src="{getUrl('')}{$val->filename}" xmlns="http://www.w3.org/1999/xhtml" />
</object>
<!--@elseif(in_array($val->fileextension,array('gif','png','jpg','jpeg')))-->
<img src="{getUrl('')}{$val->filename}" style="max-height:100px" />
<img src="{getUrl('')}{$val->filename}" style="max-height:60px" />
<!--@end-->
</td>
<td>
<p loop="$val->attributes => $name, $value">
{$name} : {$value}
{$name}: {$value}
</p>
</td>
<td>
<button type="button" class="x_btn x_btn-danger" style="white-space:nowrap" onclick="XE.filebox.deleteFile('{$val->module_filebox_srl}');">{$lang->cmd_delete}</button>
<button type="button" class="x_btn x_btn-link" style="white-space:nowrap" onclick="XE.filebox.deleteFile('{$val->module_filebox_srl}');">{$lang->cmd_delete}</button>
</td>
</tr>
</tbody>