From 094bfaf38d2f852077adea5dbf3d75ebec68588d Mon Sep 17 00:00:00 2001 From: Andy Strobel Date: Sun, 27 Apr 2014 13:47:59 +0200 Subject: [PATCH] Prepared checkboxes and radio buttons for the new jquery flatelements plugin --- .../modules/polls/widgets/views/entry.php | 17 +++++++--- .../modules/polls/widgets/views/pollForm.php | 2 +- .../space/views/admin/members.php | 33 ++++++++++++++++--- .../space/widgets/views/spaceInfo.php | 3 +- 4 files changed, 45 insertions(+), 10 deletions(-) diff --git a/protected/modules/polls/widgets/views/entry.php b/protected/modules/polls/widgets/views/entry.php index 12b70a4c1f..29e9232a8c 100644 --- a/protected/modules/polls/widgets/views/entry.php +++ b/protected/modules/polls/widgets/views/entry.php @@ -26,11 +26,20 @@
hasUserVoted()) : ?> -
+
allow_multiple) : ?> - id . ']'); ?> +
+ +
+ - $answer->id)); ?> +
+ +
@@ -117,7 +126,7 @@ $voteUrl = CHtml::normalizeUrl(array('/polls/poll/answerReset', 'sguid' => $space->guid, 'pollId' => $poll->id)); echo HHtml::ajaxLink(Yii::t('PollsModule.base', 'Reset my vote'), $voteUrl, array( 'dataType' => 'json', - 'success' => "function(json) { $('#wallEntry_'+json.wallEntryId).html(parseHtml(json.output)); }", + 'success' => "function(json) { $('#wallEntry_'+json.wallEntryId).html(parseHtml(json.output)); $('#wallEntry_'+json.wallEntryId).find(':checkbox, :radio').flatelements(); }", ), array('id' => "PollAnswerResetButton_" . $poll->id, 'class' => 'btn btn-danger') ); ?> diff --git a/protected/modules/polls/widgets/views/pollForm.php b/protected/modules/polls/widgets/views/pollForm.php index 7ef1301a76..a849e4c99f 100644 --- a/protected/modules/polls/widgets/views/pollForm.php +++ b/protected/modules/polls/widgets/views/pollForm.php @@ -5,7 +5,7 @@ "contentForm_answersText", 'rows' => '5', "class" => "form-control contentForm", "tabindex" => "2", "placeholder" => Yii::t('PollsModule.base', "Possible answers (one per line)"))); ?>
diff --git a/protected/modules_core/space/views/admin/members.php b/protected/modules_core/space/views/admin/members.php index 2d72d1155e..0bdc1bb657 100644 --- a/protected/modules_core/space/views/admin/members.php +++ b/protected/modules_core/space/views/admin/members.php @@ -134,10 +134,35 @@ isOwner($user->id)) : ?> - guid . "[inviteRole]", $membership->invite_role, array('class' => 'check_invite', 'id' => "chk_invite_" . $user->id)); ?> - guid . "[shareRole]", $membership->share_role, array('class' => 'check_share', 'id' => "chk_share_" . $user->id)); ?> - guid . "[adminRole]", $membership->admin_role, array('class' => 'check_admin', 'id' => "chk_admin_" . $user->id)); ?> - + + +
+ +
+ + +
+ +
+ + +
+ +
+ + + + + + widget('application.widgets.ModalConfirmWidget', array( diff --git a/protected/modules_core/space/widgets/views/spaceInfo.php b/protected/modules_core/space/widgets/views/spaceInfo.php index f4eee62b71..e6d07709f7 100644 --- a/protected/modules_core/space/widgets/views/spaceInfo.php +++ b/protected/modules_core/space/widgets/views/spaceInfo.php @@ -2,7 +2,6 @@
name; ?>
-
+ + $(document).ready(function() { // save the count of characters