This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See http://git.chorem.org/pollen.git commit 7e785f1216d433c1f9a465b5d0b4ee8bda807edc Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Wed Jun 11 12:24:20 2014 +0200 clean template --- .../src/main/webapp/partials/poll-poll.html | 58 ++++++++++++++++++++++ .../src/main/webapp/partials/poll.html | 47 ++---------------- 2 files changed, 62 insertions(+), 43 deletions(-) diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-poll.html b/pollen-ui-angular/src/main/webapp/partials/poll-poll.html new file mode 100644 index 0000000..d9eec6d --- /dev/null +++ b/pollen-ui-angular/src/main/webapp/partials/poll-poll.html @@ -0,0 +1,58 @@ +<!-- + #%L + Pollen :: UI (Angular) + %% + Copyright (C) 2009 - 2014 CodeLutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --> +<div class="pollTitle" edit-me="showEditTitle"> + <h1 ng-hide="showEditTitle"> + {{data.poll.title || 'poll.edit' | translate }} + <info-error error="restError.title[0]" data="data.poll.title"></info-error> + </h1> + + <h1 ng-show="showEditTitle"> + <input type="text" class="form-control" focus-me="showEditTitle" ng-model="data.poll.title" ng-exit="showEditTitle = false" auto-save="autoSavePoll()" required/> + </h1> +</div> + +<div ng-hide="showEditDesc || !globalVariables.editMode && !data.poll.description " class="pollDesc" edit-me="showEditDesc"> + <div ng-bind-html="toHTML(data.poll.description)"></div> + <div ng-hide="data.poll.description ">{{ 'poll.desc' | translate }}</div> +</div> +<div ng-show="showEditDesc" class="pollDesc"> + <textarea id="descEditor" data-ck-editor ng-model="data.poll.description"></textarea> + + <!-- fix me : no save in creation but save in edition --> + <button type="button" class="btn btn-primary" ng-click="showEditDesc = false;" ng-show="globalVariables.create">{{ 'action.return' | translate }}</button> + <button type="button" class="btn btn-primary" ng-click="showEditDesc = false; savePoll()" ng-show="globalVariables.edit">{{ 'action.return' | translate }}</button> +</div> + +<div id="poll"> + + <div ng-include="templateURL"></div> + +</div> + +<div ng-if="globalVariables.create"> + <hr/> + <button class="btn btn-primary" ng-click="savePoll()">{{ 'action.save' | translate }}</button> +</div> + +<div ng-if="globalVariables.edit"> + <hr/> + <button class="btn btn-danger" ng-click="deletePoll();">{{ 'action.delete' | translate }}</button> +</div> \ No newline at end of file diff --git a/pollen-ui-angular/src/main/webapp/partials/poll.html b/pollen-ui-angular/src/main/webapp/partials/poll.html index 4f4517c..888b3f1 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll.html @@ -35,52 +35,13 @@ <li ng-class="{active: tab == 'participant'}" ng-show="data.poll.permission || globalVariables.create"><a href="{{globalVariables.linkParticipant || '#/poll/create?tab=participant'}}" ng-click="tab = 'participant'">{{ 'poll.tab.participant' | translate }}</a></li> </ul> -<div ng-include="'partials/poll-link.html'" ng-if="tab == 'home'"></div> + <div ng-include="'./partials/poll-link.html'" ng-if="tab == 'home'"></div> -<div ng-if="tab == 'edit' || tab == 'vote'"> - <div class="pollTitle" edit-me="showEditTitle"> - <h1 ng-hide="showEditTitle"> - {{data.poll.title || 'poll.edit' | translate }} - <info-error error="restError.title[0]" data="data.poll.title"></info-error> - </h1> + <div ng-include="'./partials/poll-poll.html'" ng-if="tab == 'edit' || tab == 'vote'"></div> - <h1 ng-show="showEditTitle"> - <input type="text" class="form-control" focus-me="showEditTitle" ng-model="data.poll.title" ng-exit="showEditTitle = false" auto-save="autoSavePoll()" required/> - </h1> - </div> + <div ng-include="'./partials/poll-settings.html'" ng-if="tab == 'conf'"></div> - <div ng-hide="showEditDesc || !globalVariables.editMode && !data.poll.description " class="pollDesc" edit-me="showEditDesc"> - <div ng-bind-html="toHTML(data.poll.description)"></div> - <div ng-hide="data.poll.description ">{{ 'poll.desc' | translate }}</div> - </div> - <div ng-show="showEditDesc" class="pollDesc"> - <textarea id="descEditor" data-ck-editor ng-model="data.poll.description"></textarea> - - <!-- fix me : no save in creation but save in edition --> - <button type="button" class="btn btn-primary" ng-click="showEditDesc = false;" ng-show="globalVariables.create">{{ 'action.return' | translate }}</button> - <button type="button" class="btn btn-primary" ng-click="showEditDesc = false; savePoll()" ng-show="globalVariables.edit">{{ 'action.return' | translate }}</button> - </div> - - <div id="poll"> - - <div ng-include="templateURL"></div> - - </div> - - <div ng-if="globalVariables.create"> - <hr/> - <button class="btn btn-primary" ng-click="savePoll()">{{ 'action.save' | translate }}</button> - </div> - - <div ng-if="globalVariables.edit"> - <hr/> - <button class="btn btn-danger" ng-click="deletePoll();">{{ 'action.delete' | translate }}</button> - </div> -</div> - - <div ng-include="'partials/poll-settings.html'" ng-if="tab == 'conf'"></div> - - <div ng-include="'partials/poll-comment.html'" ng-if="tab == 'comment'"></div> + <div ng-include="'./partials/poll-comment.html'" ng-if="tab == 'comment'"></div> <div ng-include="'./partials/poll-result.html'" ng-if="tab == 'result'"></div> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.