Skip to content

Commit

Permalink
NGExの有効期限がデフォルトで有効化されるバグを修正 closes #209
Browse files Browse the repository at this point in the history
  • Loading branch information
nodaguti committed Dec 6, 2014
1 parent b93344d commit ca2a5d2
Showing 1 changed file with 52 additions and 2 deletions.
Expand Up @@ -99,7 +99,7 @@
this.setAutoNaming(true);
setTimeout(() => {
this._setExpirePreset('today');
this._setExpirePreset('today', true);
}, 0);
]]></constructor>

Expand Down Expand Up @@ -141,6 +141,11 @@
]]></body>
</method>

<!--
/**
* 自動ネーミングを切り替える
*/
-->
<method name="toggleAutoNaming">
<body><![CDATA[
let checkbox = this._root.querySelector('.auto-naming');
Expand All @@ -150,6 +155,12 @@
]]></body>
</method>

<!--
/**
* 自動ネーミングを設定する
* @param {Boolean} enable 設定する値
*/
-->
<method name="setAutoNaming">
<parameter name="enable"/>
<body><![CDATA[
Expand All @@ -161,12 +172,23 @@
]]></body>
</method>

<!--
/**
* ラベルを入力されたデータから得られるラベルに設定する
*/
-->
<method name="setLabel">
<body><![CDATA[
this._labelbox.value = this.getLabelText();
]]></body>
</method>

<!--
/**
* 入力データからラベルを得る
* @return {String} ラベル
*/
-->
<method name="getLabelText">
<body><![CDATA[
let rulesText = this._ruleEditor.getLabelText();
Expand All @@ -176,6 +198,12 @@
]]></body>
</method>

<!--
/**
* 入力データに一致するNGデータオブジェクトを得る
* @return {NGExData}
*/
-->
<method name="getNgData">
<body><![CDATA[
// eval 関数の代替
Expand Down Expand Up @@ -224,6 +252,12 @@
]]></body>
</method>

<!--
/**
* データを入力フィールドに入力する
* @param {NGExData} 入力するデータ
*/
-->
<method name="populateData">
<parameter name="ngData"/>
<body><![CDATA[
Expand Down Expand Up @@ -261,10 +295,20 @@
]]></body>
</method>

<!--
/**
* プリセットから有効期限を設定する
* @param {String} relativeExpire 有効期限を表す文字列 現在からの相対時間(ミリ秒), または 'today', 'tomorrow' など
* @param {Boolean} notToEnableExpire 有効期限を有効にしないようにする
*/
-->
<method name="_setExpirePreset">
<parameter name="relativeExpire" />
<parameter name="notToEnableExpire" />
<body><![CDATA[
this._root.querySelector('.set-expire').checked = true;
if(!notToEnableExpire){
this._root.querySelector('.set-expire').checked = true;
}
if(Number.isInteger(relativeExpire - 0)){
let expire = Date.now() + (relativeExpire - 0);
Expand Down Expand Up @@ -298,6 +342,12 @@
]]></body>
</method>

<!--
/**
* 有効期限を設定する
* @param {Date} expire
*/
-->
<method name="_populateExpire">
<parameter name="expire" />
<body><![CDATA[
Expand Down

0 comments on commit ca2a5d2

Please sign in to comment.