immediately delete rss image using ajax

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12555 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
nagoon97 2013-01-15 05:31:12 +00:00
parent 58af552862
commit 1add50bc89
3 changed files with 35 additions and 3 deletions

View file

@ -1011,9 +1011,15 @@ jQuery(function($){
$.xeMsgBox._showFoggy(); $.xeMsgBox._showFoggy();
$.xeMsgBox.fnOnShow(); $.xeMsgBox.fnOnShow();
if($msgBox.find('input').length > 0){ if($msgBox.find('input,button').length > 0){
setTimeout(function(){ setTimeout(function(){
$msgBox.find('input').focus() $msgBox.find('input,button').each(function(n, el){
var $el = $(el);
if($el.is(":visible")){
$el.focus();
return false;
}
});
}, 0); }, 0);
} }
}); });

View file

@ -1593,6 +1593,7 @@ jQuery(function($){
$(ev.target).find('.title').attr('href', htInfo.href); $(ev.target).find('.title').attr('href', htInfo.href);
//$(ev.target).find('.url').html(htInfo.url); //$(ev.target).find('.url').html(htInfo.url);
$(ev.target).find('.module_type').html($._xeAdminVar.htItemTypes[htInfo.sModuleType].title); $(ev.target).find('.module_type').html($._xeAdminVar.htItemTypes[htInfo.sModuleType].title);
if(htInfo.bShortCut){ if(htInfo.bShortCut){

View file

@ -40,10 +40,26 @@
<div class="x_control-group"> <div class="x_control-group">
<label class="x_control-label" for="image">{$lang->feed_image}</label> <label class="x_control-label" for="image">{$lang->feed_image}</label>
<div class="x_controls"> <div class="x_controls">
<!--@if($total_config->image)-->
<div class="_rss_image_container">
<!--
<img src="../../../{$total_config->image}" alt="image" />
<input type="checkbox" name="del_image" value="Y" id="del_image" />
<label for="del_image">{$lang->cmd_delete}</label>
-->
<div class="x_thumbnail" cond="$total_config->image" style="display:inline-block;margin:0 0 5px 0"> <div class="x_thumbnail" cond="$total_config->image" style="display:inline-block;margin:0 0 5px 0">
<img src="../../../{$total_config->image}" alt="image" style="max-width:210px;max-height:150px" /> <img src="../../../{$total_config->image}" alt="image" style="max-width:210px;max-height:150px" />
<!--
<label for="del_image" class="x_caption" style="padding:5px 0 0 0;margin:0"><input type="checkbox" name="del_image" value="Y" id="del_image" /> {$lang->cmd_delete}</label> <label for="del_image" class="x_caption" style="padding:5px 0 0 0;margin:0"><input type="checkbox" name="del_image" value="Y" id="del_image" /> {$lang->cmd_delete}</label>
-->
<input type="button" class="_delete_rss_image" value="{$lang->cmd_delete}" />
</div> </div>
</div>
<!--@end-->
<p><input type="file" name="image" value="" id="image" /></p> <p><input type="file" name="image" value="" id="image" /></p>
</div> </div>
</div> </div>
@ -105,3 +121,12 @@
</div> </div>
</form> </form>
</section> </section>
<script>
jQuery(function($){
$("._delete_rss_image").click(function(){
$.exec_json('rss.procRssAdminDeleteFeedImage', {del_image:'Y'}, function(){
$("._rss_image_container").hide();
});
});
});
</script>