From 8683e979486fc2bd99c5e2cb284107730209f739 Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Thu, 30 Jun 2016 17:56:58 +0900 Subject: [PATCH 1/4] =?UTF-8?q?Glyphicons=E3=82=92=E4=BD=BF=E3=81=86?= =?UTF-8?q?=E9=9A=9B=E3=81=AE=E3=82=A2=E3=82=AF=E3=82=BB=E3=82=B7=E3=83=93?= =?UTF-8?q?=E3=83=AA=E3=83=86=E3=82=A3=E5=AF=BE=E5=BF=9C=20https://github.?= =?UTF-8?q?com/NetCommons3/NetCommons3/issues/277?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- View/Helper/BackToHelper.php | 6 ++++-- View/Helper/ButtonHelper.php | 20 ++++++++++++-------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/View/Helper/BackToHelper.php b/View/Helper/BackToHelper.php index ef8f9f3e..3e896fc0 100644 --- a/View/Helper/BackToHelper.php +++ b/View/Helper/BackToHelper.php @@ -56,7 +56,8 @@ public function button($title, $url, $options = array()) { $options['icon'] = 'remove'; } if ($options['icon'] !== '') { - $iconElement = ' '; + $iconElement = ' '; unset($options['icon']); $title = h($title); @@ -108,7 +109,8 @@ public function linkButton($title, $url, $options = array()) { $icon = Hash::get($options, 'icon', 'remove'); $options = Hash::remove($options, 'icon'); if ($icon) { - $iconElement = ' '; + $iconElement = ' '; } //ボタンサイズ diff --git a/View/Helper/ButtonHelper.php b/View/Helper/ButtonHelper.php index e6831bbd..126503cb 100644 --- a/View/Helper/ButtonHelper.php +++ b/View/Helper/ButtonHelper.php @@ -70,7 +70,7 @@ public function getButtonSize() { public function button($title, $options = array()) { $icon = Hash::get($options, 'icon'); if ($icon) { - $title = ' ' . $title; + $title = ' ' . $title; $options = Hash::remove($options, 'icon'); $options = Hash::insert($options, 'escape', false); } @@ -112,7 +112,7 @@ public function button($title, $options = array()) { public function delete($title, $confirm, $options = array()) { $output = ''; - $title = ' ' . $title; + $title = ' ' . $title; $defaultOptions = array( 'name' => 'delete', @@ -156,7 +156,8 @@ public function delete($title, $confirm, $options = array()) { public function save($title, $options = array()) { if (isset($options['icon'])) { $title = h($title); - $title .= ' '; + $title .= ' '; $options['escape'] = false; } @@ -173,7 +174,7 @@ public function save($title, $options = array()) { $inputOptions = Hash::merge(array( 'class' => 'btn btn-primary' . $this->getButtonSize() . ' btn-workflow', 'ng-disabled' => 'sending', - 'ng-click' => 'sending=true', + 'ng-click' => 'sending=true' ), $options); $inputOptions = Hash::remove($inputOptions, 'url'); @@ -265,7 +266,7 @@ public function cancelAndSaveAndSaveTemp($cancelUrl = null, $cancelOptions = [], $cancelOptions = Hash::remove($cancelOptions, 'label'); $output .= $this->Html->link( - ' ' . $label, + ' ' . $label, $cancelUrl, $cancelOptions ); @@ -273,7 +274,8 @@ public function cancelAndSaveAndSaveTemp($cancelUrl = null, $cancelOptions = [], //前へボタン if (isset($backUrl)) { $output .= $this->Html->link( - ' ' . __d('net_commons', 'BACK'), + ' ' . + __d('net_commons', 'BACK'), $backUrl, array( 'class' => 'btn btn-default' . $this->getButtonSize() . ' btn-workflow', @@ -320,7 +322,8 @@ public function search($title, $options = array()) { $options['icon'] = Hash::get($options, 'icon', 'search'); if ($options['icon'] !== '') { - $iconElement = ' '; + $iconElement = ' '; unset($options['icon']); } else { $iconElement = ''; @@ -348,7 +351,8 @@ public function add($title, $options = array()) { $options['icon'] = Hash::get($options, 'icon', 'plus'); if ($options['icon'] !== '') { - $iconElement = ' '; + $iconElement = ' '; unset($options['icon']); } else { $iconElement = ''; From 2501d0e9dffff1bb1e4aa8f43a5b0b2fe6704a5b Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Thu, 30 Jun 2016 18:21:16 +0900 Subject: [PATCH 2/4] =?UTF-8?q?Glyphicons=E3=82=92=E4=BD=BF=E3=81=86?= =?UTF-8?q?=E9=9A=9B=E3=81=AE=E3=82=A2=E3=82=AF=E3=82=BB=E3=82=B7=E3=83=93?= =?UTF-8?q?=E3=83=AA=E3=83=86=E3=82=A3=E5=AF=BE=E5=BF=9C=20-=20=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Case/View/Helper/BackToHelper/LinkButtonTest.php | 12 ++++++------ .../ButtonHelper/CancelAndSaveAndSaveTempTest.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Test/Case/View/Helper/BackToHelper/LinkButtonTest.php b/Test/Case/View/Helper/BackToHelper/LinkButtonTest.php index f55947a6..d551e2d2 100644 --- a/Test/Case/View/Helper/BackToHelper/LinkButtonTest.php +++ b/Test/Case/View/Helper/BackToHelper/LinkButtonTest.php @@ -81,7 +81,7 @@ public function testLinkButtonWithTitle($title) { //チェック $expected = '' . - ' ' . $title . + ' ' . $title . ''; $this->assertEquals($expected, $result); } @@ -125,7 +125,7 @@ public function testLinkButtonWithIcon($icon) { //チェック if ($icon) { - $expected = ' '; + $expected = ' '; } else { $expected = ''; } @@ -172,9 +172,9 @@ public function testLinkButtonWithIconSize($iconSize) { $expectedIconSize = ''; } $expected = '' . - ' ' . + ' ' . ''; - $this->assertEqual($expected, $result); + $this->assertEquals($expected, $result); } /** @@ -213,9 +213,9 @@ public function testLinkButtonWithEscapeTitle($title, $escapeTitle, $expectedTit //チェック $expected = '' . - ' ' . $expectedTitle . + ' ' . $expectedTitle . ''; - $this->assertEqual($expected, $result); + $this->assertEquals($expected, $result); } } diff --git a/Test/Case/View/Helper/ButtonHelper/CancelAndSaveAndSaveTempTest.php b/Test/Case/View/Helper/ButtonHelper/CancelAndSaveAndSaveTempTest.php index a37844bd..cf141540 100644 --- a/Test/Case/View/Helper/ButtonHelper/CancelAndSaveAndSaveTempTest.php +++ b/Test/Case/View/Helper/ButtonHelper/CancelAndSaveAndSaveTempTest.php @@ -140,7 +140,7 @@ public function testCancelAndSaveAndSaveTemp($status, $contentPublishable, $canc private function __assertButtons($result, $cancelUrl, $backUrl, $disapproval, $approval) { //キャンセルのチェック $expected = '' . - ' ' . __d('net_commons', 'Cancel') . + ' ' . __d('net_commons', 'Cancel') . ''; $this->assertTextContains($expected, $result); From 59b8e4d8813bafd427ce43c5e4cbf1bc0d46b5cb Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Thu, 30 Jun 2016 18:23:05 +0900 Subject: [PATCH 3/4] =?UTF-8?q?save()=E3=81=A7=E4=BD=BF=E3=82=8F=E3=82=8C?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84$defaultOptions=20=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- View/Helper/ButtonHelper.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/View/Helper/ButtonHelper.php b/View/Helper/ButtonHelper.php index 126503cb..a1dd98fd 100644 --- a/View/Helper/ButtonHelper.php +++ b/View/Helper/ButtonHelper.php @@ -161,13 +161,6 @@ public function save($title, $options = array()) { $options['escape'] = false; } - $defaultOptions = array( - 'name' => 'save', - 'class' => 'btn btn-primary' . $this->getButtonSize() . ' btn-workflow', - 'ng-disabled' => 'sending' - ); - $inputOptions = Hash::merge($defaultOptions, $options); - if (Hash::get($options, 'url')) { $options['url'] = $this->NetCommonsHtml->url(Hash::get($options, 'url')); From f25b573884df56fd67c6078a9267818fec86cead Mon Sep 17 00:00:00 2001 From: Mitsuru Mutaguchi Date: Thu, 30 Jun 2016 19:06:12 +0900 Subject: [PATCH 4/4] =?UTF-8?q?Glyphicons=E3=82=92=E4=BD=BF=E3=81=86?= =?UTF-8?q?=E9=9A=9B=E3=81=AE=E3=82=A2=E3=82=AF=E3=82=BB=E3=82=B7=E3=83=93?= =?UTF-8?q?=E3=83=AA=E3=83=86=E3=82=A3=E5=AF=BE=E5=BF=9C=20-=20=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/Helper/ButtonHelper/CancelAndSaveAndSaveTempTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Test/Case/View/Helper/ButtonHelper/CancelAndSaveAndSaveTempTest.php b/Test/Case/View/Helper/ButtonHelper/CancelAndSaveAndSaveTempTest.php index cf141540..24701515 100644 --- a/Test/Case/View/Helper/ButtonHelper/CancelAndSaveAndSaveTempTest.php +++ b/Test/Case/View/Helper/ButtonHelper/CancelAndSaveAndSaveTempTest.php @@ -147,7 +147,7 @@ private function __assertButtons($result, $cancelUrl, $backUrl, $disapproval, $a //戻るのチェック if ($backUrl) { $expected = '' . - ' ' . __d('net_commons', 'BACK') . + ' ' . __d('net_commons', 'BACK') . ''; $this->assertTextContains($expected, $result); } else {