This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function($){ | |
var btn = $('<button class="button mt-edit-field-button"></button>') | |
.text('公開日を現在時刻に設定') | |
.click(function(){ | |
if (confirm('公開日時を変更していいですか!?') == false) { | |
return false; | |
} | |
stamp(); | |
return false; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mtappVars.DataAPI.getContentData(31, 3, 3, function (res) { | |
const cd = jQuery.extend({}, res); | |
for (let i = 0; i < cd.data.length; i++) { | |
if (cd.data[i].label === "取扱店舗") { | |
cd.data[i].data = null; | |
} | |
} | |
mtappVars.DataAPI.updateContentData(31, 3, 3, cd, function (newCd) { | |
console.log(newCd); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
// 特定のコンテンツタイプだけにカスタマイズを適用する | |
if (mtappVars.type.indexOf('content_data') !== -1 && mtappVars.content_type_id == 5) { | |
// コンテンツフィールドのIDを指定します。 | |
// ブラウザの開発者ツールで入力欄(今回は「オススメ書籍一覧」」フィールドのテキストエリア)を確認し、 | |
// <input type="text" name="content-field-47" となっている 47 部分が該当します。 | |
const contentFieldId = '47'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
// $.MTAppCategorySwitch({ | |
// selector: { | |
// 'init': '#title-field', | |
// 'hide': | |
// '#text-field,#excerpt-field,#customfield_entryogimage-field,#customfield_entryeyecatch-field,#customfield_entryappendix-field,#customfield_entrycontact-field,#customfield_entrylinkurl-field', | |
// 'cat49': | |
// '#title-field,#text-field,#excerpt-field,#customfield_entryogimage-field,#customfield_entryeyecatch-field,#customfield_entryappendix-field,#customfield_entrycontact-field', | |
// 'cat50': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
// 記事編集画面のカスタマイズ | |
if (mtappVars.screen_id == 'edit-entry') { | |
if (mtappVars.site.customfields.blog_is_jpen) { | |
// 英文タイトルのスタイルを設定 | |
$('#customfield_entry_title_en').addClass('title').attr('placeholder', '英文タイトル'); | |
// フィールドの表示/非表示を切り替えられなくする | |
$(('#entry_fields-field')).hide(); |
OlderNewer