Skip to content

Commit

Permalink
$.MTAppDebug()をアップデートした。
Browse files Browse the repository at this point in the history
  • Loading branch information
tinybeans committed Mar 2, 2012
1 parent 696baac commit f05b287
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion mt-static/plugins/_MTAppjQuery/js/MTAppjQuery.js
Expand Up @@ -1194,7 +1194,10 @@
} }


var pageInfo = [ var pageInfo = [
'<p id="mtapp-debug-pageinfo-title" class="msg-text"><a href="javascript: void(0);">このページの情報</a></p>', '<p id="mtapp-debug-tools" class="msg-text">',
'<a id="mtapp-debug-pageinfo-title" href="javascript:void(0);" class="button">このページの情報</a>',
'<a href="javascript:void(0);" class="button" id="mtapp-show-basename">ベースネームを表示(メインカラム)</a>',
'</p>',
'<p id="mtapp-debug-pageinfo-content" class="msg-text">', '<p id="mtapp-debug-pageinfo-content" class="msg-text">',
'body'+ bodyID + '.' + bodyClass + '<br />', 'body'+ bodyID + '.' + bodyClass + '<br />',
'var mtappVars = { <br />' + mtappVarsStr.join(',<br />') + '<br />};', 'var mtappVars = { <br />' + mtappVarsStr.join(',<br />') + '<br />};',
Expand All @@ -1208,6 +1211,20 @@
$('#mtapp-debug-pageinfo-title').click(function(){ $('#mtapp-debug-pageinfo-title').click(function(){
$('#mtapp-debug-pageinfo-content').slideToggle(); $('#mtapp-debug-pageinfo-content').slideToggle();
}); });
$('#mtapp-show-basename').click(function(){
var fieldSort = [];
$('#main-content')
.find('div.field:visible').each(function(){
var basename = $(this).attr('id').replace(/-field$/,'').replace(/^customfield_/,'c:');
fieldSort.push(basename);
$(this).before('<input type="text" value="' + basename + '" />');
})
.end()
.prepend($.MTAppMakeField({
label: '現在の並び順(MTAppFieldSort用)',
content: '<textarea class="text high">' + fieldSort.join(',') + '</textarea>'
}));
});


// [ブログ記事の管理] // [ブログ記事の管理]
if (mtappVars.screen_id == 'list-entry') { if (mtappVars.screen_id == 'list-entry') {
Expand Down

0 comments on commit f05b287

Please sign in to comment.