mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-12 07:11:42 +09:00
Theme manager UI
1. add theme.js 2. modify some style related to theme preview git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8694 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b00f2a0581
commit
e14a9a8388
3 changed files with 80 additions and 4 deletions
|
|
@ -544,10 +544,10 @@ input#lang_mn{background:url(../img/flag.mn.gif) no-repeat 96% center}
|
|||
.noticeAlert h2{zoom:1;margin:.83em 0}
|
||||
.noticeAlert em{font-style:normal;font-weight:bold}
|
||||
/* Theme & Skin Preview */
|
||||
.thumbPreview li{position:relative}
|
||||
.thumbPreview li.active{border-left:2px solid #ccc;border-right:2px solid #ccc;padding-left:1em;padding-right:1em;background:#FFFCE0}
|
||||
.thumbPreview li{position:relative;padding-left:10px;padding-right:10px;}
|
||||
.thumbPreview li.active{background:#FFFCE0}
|
||||
.thumbPreview .prevToggle{position:absolute;top:8px;right:0;line-height:16px;padding:0 18px 0 0;text-decoration:none;background:url(../img/iconArrow.gif) no-repeat right -32px}
|
||||
.thumbPreview li.active .prevToggle{right:1em;background-position:right 0}
|
||||
.thumbPreview li.active .prevToggle{background-position:right 0}
|
||||
.thumbPreview .a{border:0;margin:0;zoom:1}
|
||||
.thumbPreview .a:after{content:"";display:block;clear:both}
|
||||
.thumbPreview .i{float:left;vertical-align:top;margin:0 1em 1em 0;padding:0;border:0;zoom:1}
|
||||
|
|
@ -557,7 +557,7 @@ input#lang_mn{background:url(../img/flag.mn.gif) no-repeat 96% center}
|
|||
.thumbPreview .i input{display:none}
|
||||
.thumbPreview .i ul{display:none}
|
||||
.thumbPreview .i.checked{display:block;float:none}
|
||||
.thumbPreview .i.checked .thumb{float:left;width:180px;height:120px;margin:0 1em 0 0;border:5px solid #C6DFEC;box-shadow:0 0 5px #666 inset;-moz-box-shadow:0 0 3px #666 inset;-webkit-box-shadow:0 0 5px #666 inset;background:none}
|
||||
.thumbPreview .i.checked .thumb{float:left;width:180px;height:120px;margin:0 1em 0 0;border:5px solid #C6DFEC;box-shadow:0 0 5px #666 inset;-moz-box-shadow:0 0 3px #666 inset;-webkit-box-shadow:0 0 5px #666 inset}
|
||||
.thumbPreview li.active .i.checked .thumb{border-color:#66A9CC}
|
||||
.thumbPreview .i.checked .thumb img{width:180px;position:relative;z-index:-1}
|
||||
.thumbPreview li.active .i.checked .thumb img{z-index:auto}
|
||||
|
|
|
|||
74
modules/admin/tpl/js/theme.js
Normal file
74
modules/admin/tpl/js/theme.js
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
jQuery(function($){
|
||||
|
||||
$('#theme,#skin')
|
||||
// all thumbnail area
|
||||
.find('>.thumbPreview')
|
||||
// thumbnail list
|
||||
.find('.a')
|
||||
.has('li.i:nth-child(2)')
|
||||
.after('<a href="#" class="prevToggle">Show</a>')
|
||||
.next('a.prevToggle')
|
||||
.click(function(){
|
||||
var $list = $(this).prev('.a');
|
||||
|
||||
if($list.parent().hasClass('active')) {
|
||||
$list.trigger('hide.tp');
|
||||
} else {
|
||||
$list.trigger('show.tp');
|
||||
}
|
||||
|
||||
return false;
|
||||
})
|
||||
.end()
|
||||
.end()
|
||||
.bind('show.tp', function(){
|
||||
$(this)
|
||||
.parent().addClass('active').end()
|
||||
.find('>.i:gt(0)')
|
||||
.slideDown(100, function(){
|
||||
var $this = $(this);
|
||||
|
||||
if(!$this.prev('.checked').length) return;
|
||||
});
|
||||
})
|
||||
.bind('hide.tp', function(){
|
||||
$(this)
|
||||
.parent().removeClass('active').end()
|
||||
.find('>.i:gt(0)')
|
||||
.slideUp(100, function(){
|
||||
var $this = $(this);
|
||||
|
||||
if(!$this.prev('.checked').length) return;
|
||||
});
|
||||
})
|
||||
.end()
|
||||
.find('.i:not(:first-child)').hide().end()
|
||||
.bind('paint.pr', function(){
|
||||
$(this)
|
||||
.find('.i')
|
||||
.removeClass('checked')
|
||||
.find('.checkIcon').remove().end()
|
||||
.end()
|
||||
.find('.i:has(>input:checked)')
|
||||
.addClass('checked')
|
||||
.each(function(){
|
||||
var $this = $(this);
|
||||
$this.parent().prepend($this);
|
||||
})
|
||||
.end()
|
||||
.find('.i.checked').show();
|
||||
})
|
||||
.trigger('paint.pr')
|
||||
.find('span.thumb')
|
||||
.attr('role', 'radio') // WAI-ARIA role
|
||||
.click(function(){
|
||||
var $radio = $(this).next('input:radio');
|
||||
|
||||
$radio.is(':checked')?
|
||||
$radio.closest('.a').trigger('show.tp') :
|
||||
$radio.prop('checked', true).change();
|
||||
})
|
||||
.next('input:radio').change(function(){ $(this).closest('.a').trigger('paint.pr') }).end()
|
||||
.end()
|
||||
.end()
|
||||
});
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
<load target="js/theme.js" type="body" />
|
||||
|
||||
<h1 class="h1">Theme</h1>
|
||||
<p class="xe_validator_error">{$XE_VALIDATOR_ERROR}</p>
|
||||
<form ruleset="insertThemeInfo" action="./" method="post" class="form">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue