Merge pull request #1956 from emanuelschuetze/master
Several template fixes
This commit is contained in:
commit
3be21473a4
@ -27,7 +27,7 @@
|
||||
"js-data": "~2.8.2",
|
||||
"js-data-angular": "~3.1.0",
|
||||
"ng-file-upload": "~11.2.3",
|
||||
"ckeditor": "~4.5.6",
|
||||
"ckeditor": "4.5.6",
|
||||
"angular-ckeditor": "~1.0.3",
|
||||
"angular-pdf": "~1.3.0",
|
||||
"roboto-condensed": "~0.3.0",
|
||||
|
@ -71,13 +71,13 @@ angular.module('OpenSlidesApp.agenda.site', ['OpenSlidesApp.agenda'])
|
||||
'$scope',
|
||||
'$http',
|
||||
'$state',
|
||||
'DS',
|
||||
'operator',
|
||||
'ngDialog',
|
||||
'Agenda',
|
||||
'AgendaTree',
|
||||
'Customslide',
|
||||
'Projector',
|
||||
function($scope, $http, $state, operator, ngDialog, Agenda, AgendaTree, Customslide, Projector) {
|
||||
function($scope, $http, $state, DS, operator, ngDialog, Agenda, AgendaTree, Projector) {
|
||||
// Bind agenda tree to the scope
|
||||
$scope.$watch(function () {
|
||||
return Agenda.lastModified();
|
||||
@ -126,6 +126,12 @@ angular.module('OpenSlidesApp.agenda.site', ['OpenSlidesApp.agenda'])
|
||||
$state.go(item.content_object.collection.replace('/','.')+'.detail',
|
||||
{id: item.content_object.id});
|
||||
};
|
||||
// cancel QuickEdit mode
|
||||
$scope.cancelQuickEdit = function (item) {
|
||||
// revert all changes by restore (refresh) original item object from server
|
||||
Agenda.refresh(item);
|
||||
item.quickEdit = false;
|
||||
};
|
||||
// save changed item
|
||||
$scope.save = function (item) {
|
||||
Agenda.save(item).then(
|
||||
@ -143,9 +149,7 @@ angular.module('OpenSlidesApp.agenda.site', ['OpenSlidesApp.agenda'])
|
||||
};
|
||||
// delete related item
|
||||
$scope.deleteRelatedItem = function (item) {
|
||||
if (item.content_object.collection == 'core/customslide') {
|
||||
Customslide.destroy(item.content_object.id);
|
||||
}
|
||||
DS.destroy(item.content_object.collection, item.content_object.id);
|
||||
};
|
||||
|
||||
// *** delete mode functions ***
|
||||
@ -169,9 +173,7 @@ angular.module('OpenSlidesApp.agenda.site', ['OpenSlidesApp.agenda'])
|
||||
$scope.delete = function () {
|
||||
angular.forEach($scope.items, function (item) {
|
||||
if (item.selected) {
|
||||
if (item.content_object.collection == 'core/customslide') {
|
||||
Customslide.destroy(item.content_object.id);
|
||||
}
|
||||
DS.destroy(item.content_object.collection, item.content_object.id);
|
||||
}
|
||||
});
|
||||
$scope.isDeleteMode = false;
|
||||
|
@ -151,13 +151,11 @@
|
||||
<a ui-sref="agenda.item.detail({id: item.id})" translate>List of speakers</a>
|
||||
<span os-perms="agenda.can_manage"> |
|
||||
<a href="" ng-click="editDialog(item)" translate>Edit</a> |
|
||||
<a href="" ng-click="item.quickEdit=true" translate>QuickEdit</a>
|
||||
<span ng-if="item.content_object.collection == 'core/customslide'"> |
|
||||
<a href="" class="text-danger"
|
||||
ng-bootbox-confirm="{{ 'Are you sure you want to delete this entry?' | translate }}<br>
|
||||
<b>{{ item.getTitle() }}</b>"
|
||||
ng-bootbox-confirm-action="deleteRelatedItem(item)" translate>Delete</a>
|
||||
</span>
|
||||
<a href="" ng-click="item.quickEdit=true" translate>QuickEdit</a> |
|
||||
<a href="" class="text-danger"
|
||||
ng-bootbox-confirm="{{ 'Are you sure you want to delete this entry?' | translate }}<br>
|
||||
<b>{{ item.getTitle() }}</b>"
|
||||
ng-bootbox-confirm-action="deleteRelatedItem(item)" translate>Delete</a>
|
||||
</span>
|
||||
</div>
|
||||
<td ng-show="!item.quickEdit" os-perms="agenda.can_see_hidden_items" class="optional">
|
||||
@ -170,42 +168,40 @@
|
||||
<input os-perms="agenda.can_manage" type="checkbox" ng-model="item.closed" ng-change="save(item.id);">
|
||||
<!-- quickEdit columns -->
|
||||
<td ng-show="item.quickEdit" os-perms="agenda.can_manage" colspan="3">
|
||||
<form ng-submit="save(item)">
|
||||
<h4>{{ item.getTitle() }} <span class="text-muted">– QuickEdit</span></h4>
|
||||
<uib-alert ng-show="alert.show" type="{{ alert.type }}" ng-click="alert={}" close="alert={}">
|
||||
{{ alert.msg }}
|
||||
</uib-alert>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<label for="inputItemNumber" translate>Item number</label>
|
||||
<input type="text" ng-model="item.item_number" class="form-control input-sm" id="inputItemNumber">
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<label for="inputComment" translate>Comment</label>
|
||||
<input type="text" ng-model="item.comment" class="form-control input-sm" id="inputComment">
|
||||
</div>
|
||||
<uib-alert ng-show="alert.show" type="{{ alert.type }}" ng-click="alert={}" close="alert={}">
|
||||
{{ alert.msg }}
|
||||
</uib-alert>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<label for="inputItemNumber" translate>Item number</label>
|
||||
<input type="text" ng-model="item.item_number" class="form-control input-sm" id="inputItemNumber">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<!-- item type: AGENDA_ITEM = 1, HIDDEN_ITEM = 2 -->
|
||||
<input type="checkbox" ng-model="item.type" ng-true-value="1" ng-false-value="2">
|
||||
<translate>Show as agenda item</translate>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<label for="inputDuration" translate>Duration</label>
|
||||
<input type="text" ng-model="item.duration" class="form-control input-sm" id="inputDuration">
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<label for="inputComment" translate>Comment</label>
|
||||
<input type="text" ng-model="item.comment" class="form-control input-sm" id="inputComment">
|
||||
</div>
|
||||
<div class="spacer">
|
||||
<button ng-click="item.quickEdit=false" class="btn btn-default pull-left" translate>
|
||||
Cancel
|
||||
</button>
|
||||
<button type="submit" class="btn btn-primary" translate>
|
||||
Update
|
||||
</button>
|
||||
<a href="" ng-click="editDialog(item)" class="pull-right"><translate>Edit ...</translate></a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<!-- item type: AGENDA_ITEM = 1, HIDDEN_ITEM = 2 -->
|
||||
<input type="checkbox" ng-model="item.type" ng-true-value="1" ng-false-value="2">
|
||||
<translate>Show as agenda item</translate>
|
||||
</div>
|
||||
</form>
|
||||
<div class="col-xs-6">
|
||||
<label for="inputDuration" translate>Duration</label>
|
||||
<input type="text" ng-model="item.duration" class="form-control input-sm" id="inputDuration">
|
||||
</div>
|
||||
</div>
|
||||
<div class="spacer">
|
||||
<button ng-click="cancelQuickEdit(item)" class="btn btn-default pull-left" translate>
|
||||
Cancel
|
||||
</button>
|
||||
<button ng-click="save(item)" class="btn btn-primary" translate>
|
||||
Update
|
||||
</button>
|
||||
<a href="" ng-click="editDialog(item)" class="pull-right"><translate>Edit ...</translate></a>
|
||||
</div>
|
||||
</table>
|
||||
<uib-pagination total-items="itemsFiltered.length" items-per-page="itemsPerPage" ng-model="currentPage" ng-change="pageChanged()"></uib-pagination>
|
||||
</div>
|
||||
|
@ -203,6 +203,12 @@ angular.module('OpenSlidesApp.assignments.site', ['OpenSlidesApp.assignments'])
|
||||
$scope.openDialog = function (assignment) {
|
||||
ngDialog.open(AssignmentForm.getDialog(assignment));
|
||||
};
|
||||
// cancel QuickEdit mode
|
||||
$scope.cancelQuickEdit = function (assignment) {
|
||||
// revert all changes by restore (refresh) original assignment object from server
|
||||
Assignment.refresh(assignment);
|
||||
assignment.quickEdit = false;
|
||||
};
|
||||
// save changed assignment
|
||||
$scope.save = function (assignment) {
|
||||
Assignment.save(assignment).then(
|
||||
|
@ -162,7 +162,7 @@
|
||||
</span>
|
||||
|
||||
<!-- quickEdit columns -->
|
||||
<td ng-if="assignment.quickEdit" colspan="3">
|
||||
<td ng-if="assignment.quickEdit" colspan="4">
|
||||
<h4>{{ assignment.title }} <span class="text-muted">– Quick Edit</span></h4>
|
||||
<uib-alert ng-show="alert.show" type="{{ alert.type }}" ng-click="alert={}" close="alert={}">
|
||||
{{ alert.msg }}
|
||||
@ -187,7 +187,7 @@
|
||||
<div class="col-xs-6"></div>
|
||||
</div>
|
||||
<div class="spacer">
|
||||
<button ng-click="assignment.quickEdit=false" class="btn btn-default pull-left" translate>
|
||||
<button ng-click="cancelQuickEdit(assignment)" class="btn btn-default pull-left" translate>
|
||||
Cancel
|
||||
</button>
|
||||
<button ng-click="save(assignment)" class="btn btn-primary" translate>
|
||||
|
@ -51,7 +51,13 @@ h4 {
|
||||
font-size: 18px;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.heading a {
|
||||
color: #444;
|
||||
}
|
||||
.heading a:hover {
|
||||
color: #2b6883;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
p {
|
||||
padding-bottom: 14px;
|
||||
@ -284,11 +290,6 @@ img {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.col1 .meta h3 {
|
||||
padding-bottom: 0;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.col1 .details {
|
||||
padding: 20px;
|
||||
width: auto;
|
||||
@ -317,14 +318,25 @@ img {
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
#content .col2 h4, .col1 .meta h3 {
|
||||
#content .col2 h4 {
|
||||
font-size: 22px;
|
||||
line-height: 24px;
|
||||
font-family: 'Roboto Condensed Light';
|
||||
font-weight: 300;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
#content .col1 .meta .heading, #content .col1 .meta h3 {
|
||||
font-size: 22px;
|
||||
line-height: 24px;
|
||||
font-weight: 300;
|
||||
color: #444;
|
||||
padding-bottom: 0;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#content .col1 .meta .heading .drop-down-name, #content .col1 .meta h3 {
|
||||
font-family: 'Roboto Condensed Light';
|
||||
}
|
||||
|
||||
#content .col2 a:hover h4 {
|
||||
text-decoration: none;
|
||||
|
@ -16,6 +16,7 @@ body{
|
||||
box-shadow: 0 0 7px rgba(0,0,0,0.6);
|
||||
height: 70px;
|
||||
margin-bottom: 20px;
|
||||
font-family: 'Roboto Condensed Light';
|
||||
}
|
||||
#logo {
|
||||
position: relative;
|
||||
@ -46,6 +47,7 @@ body{
|
||||
opacity: 0.8;
|
||||
}
|
||||
#currentTime {
|
||||
font-family: 'Roboto Condensed Light';
|
||||
border: 0 solid #000000;
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
@ -56,6 +58,7 @@ body{
|
||||
color: #fff;
|
||||
}
|
||||
#footer {
|
||||
font-family: 'Roboto Condensed Light';
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
height: 35px;
|
||||
@ -275,11 +278,22 @@ tr.total td {
|
||||
tr.elected td {
|
||||
background-color: #BED4DE !important;
|
||||
}
|
||||
.transparentTable td {
|
||||
background-color: transparent;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.pollresults table .icon {
|
||||
color: #636363;
|
||||
height: 45px;
|
||||
}
|
||||
|
||||
/*** Agenda list ***/
|
||||
.agendalist p {
|
||||
font-size: 140%;
|
||||
}
|
||||
.spacer {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.spacer-top {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
@ -248,6 +248,8 @@ angular.module('OpenSlidesApp.motions', ['OpenSlidesApp.users'])
|
||||
return operator.hasPerms('motions.can_manage');
|
||||
case 'reset_state':
|
||||
return operator.hasPerms('motions.can_manage');
|
||||
case 'can_manage':
|
||||
return operator.hasPerms('motions.can_manage');
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -467,6 +467,12 @@ angular.module('OpenSlidesApp.motions.site', ['OpenSlidesApp.motions'])
|
||||
$scope.openDialog = function (motion) {
|
||||
ngDialog.open(MotionForm.getDialog(motion));
|
||||
};
|
||||
// cancel QuickEdit mode
|
||||
$scope.cancelQuickEdit = function (motion) {
|
||||
// revert all changes by restore (refresh) original motion object from server
|
||||
Motion.refresh(motion);
|
||||
motion.quickEdit = false;
|
||||
};
|
||||
// save changed motion
|
||||
$scope.save = function (motion) {
|
||||
// get (unchanged) values from latest version for update method
|
||||
@ -762,8 +768,9 @@ angular.module('OpenSlidesApp.motions.site', ['OpenSlidesApp.motions'])
|
||||
'motionpoll',
|
||||
'voteNumber',
|
||||
function($scope, gettextCatalog, MotionPoll, MotionPollForm, motionpoll, voteNumber) {
|
||||
// set initial values for form model
|
||||
$scope.model = motionpoll;
|
||||
// set initial values for form model by create deep copy of motionpoll object
|
||||
// so detail view is not updated while editing poll
|
||||
$scope.model = angular.copy(motionpoll);
|
||||
$scope.voteNumber = voteNumber;
|
||||
$scope.formFields = MotionPollForm.getFormFields();
|
||||
$scope.alert = {};
|
||||
|
@ -90,22 +90,27 @@
|
||||
</span>
|
||||
|
||||
<!-- State -->
|
||||
<h3 translate>State</h3>
|
||||
<span class="label" ng-class="'label-'+motion.state.css_class">
|
||||
<h3 ng-if="!motion.isAllowed('change_state')" class="heading" translate>State</h3>
|
||||
<div ng-if="motion.isAllowed('change_state')" class="heading">
|
||||
<span uib-dropdown>
|
||||
<a href id="state-dropdown" class="drop-down-name" uib-dropdown-toggle>
|
||||
<translate>State</translate>
|
||||
<i class="fa fa-cog"></i>
|
||||
</a>
|
||||
<ul uib-dropdown-menu aria-labelledby="state-dropdown">
|
||||
<li ng-repeat="state in motion.state.getNextStates()">
|
||||
<a href ng-click="updateState(state.id)">{{ state.action_word | translate }}</a>
|
||||
<li class="divider" ng-if="motion.state.getNextStates().length">
|
||||
<li>
|
||||
<a href ng-if="motion.isAllowed('reset_state')" ng-click="reset_state()">
|
||||
<i class="fa fa-exclamation-triangle"></i>
|
||||
<translate>Reset state</translate>
|
||||
</a>
|
||||
</ul>
|
||||
</span>
|
||||
</div>
|
||||
<div class="label" ng-class="'label-'+motion.state.css_class">
|
||||
{{ motion.state.name | translate }}
|
||||
</span>
|
||||
<div ng-if="motion.isAllowed('change_state')" class="spacer">
|
||||
<select ng-if="motion.state.getNextStates().length > 0" ng-model="stateSelect" class="form-control" ng-change="updateState(stateSelect)">
|
||||
<option value="" translate>--- Set next state ---</option>
|
||||
<option ng-repeat="state in motion.state.getNextStates()" value="{{ state.id }}">
|
||||
{{ state.action_word | translate }}
|
||||
</option>
|
||||
</select>
|
||||
<button ng-if="motion.isAllowed('reset_state')" ng-click="reset_state()"
|
||||
class="btn btn-danger btn-xs spacer">
|
||||
<i class="fa fa-exclamation-triangle"></i>
|
||||
<translate>Reset state</translate>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
@ -197,7 +197,7 @@
|
||||
</span>
|
||||
|
||||
<!-- quickEdit columns -->
|
||||
<td ng-if="motion.quickEdit && motion.isAllowed('quickedit')" colspan="5">
|
||||
<td ng-if="motion.quickEdit && motion.isAllowed('quickedit')" colspan="6">
|
||||
<h4>{{ motion.getTitle() }} <span class="text-muted">– <translate>QuickEdit</translate></span></h4>
|
||||
<uib-alert ng-show="alert.show" type="{{ alert.type }}" ng-click="alert={}" close="alert={}">
|
||||
{{ alert.msg }}
|
||||
@ -255,7 +255,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="spacer">
|
||||
<button ng-click="motion.quickEdit=false" class="btn btn-default pull-left" translate>
|
||||
<button ng-click="cancelQuickEdit(motion)" class="btn btn-default pull-left" translate>
|
||||
Cancel
|
||||
</button>
|
||||
<button ng-if="motion.isAllowed('update')" ng-click="save(motion)" class="btn btn-primary" translate>
|
||||
|
@ -10,6 +10,46 @@
|
||||
<div ng-repeat="submitter in motion.submitters">
|
||||
{{ submitter.get_full_name() }}<br>
|
||||
</div>
|
||||
|
||||
<!-- Poll results -->
|
||||
<h3 ng-if="motion.polls.length > 0" translate>Voting result</h3>
|
||||
<div ng-repeat="poll in motion.polls | orderBy:'-id'" class="spacer">
|
||||
<div ng-show="poll.has_votes" class="pollresults">
|
||||
<strong ng-if="motion.polls.length > 1"><translate>Vote</translate> {{ motion.polls.length - $index }}:</strong>
|
||||
<table class="transparentTable spacer">
|
||||
<!-- yes -->
|
||||
<tr>
|
||||
<td class="icon">
|
||||
<i class="fa fa-thumbs-up fa-2x"></i>
|
||||
<td>
|
||||
<span class="result_label"><translate>Yes</translate>:</span>
|
||||
<span class="result_value">{{ poll.yes }} {{ poll.getYesPercent() }}</span>
|
||||
<div ng-if="poll.getYesPercent(true)">
|
||||
<uib-progressbar value="poll.getYesPercent(true)" type="success"></uib-progressbar>
|
||||
</div>
|
||||
<!-- no -->
|
||||
<tr>
|
||||
<td class="icon">
|
||||
<i class="fa fa-thumbs-down fa-2x"></i>
|
||||
<td>
|
||||
<span class="result_label"><translate>No</translate>:</span>
|
||||
<span class="result_value">{{ poll.no }} {{ poll.getNoPercent() }}</span>
|
||||
<div ng-if="poll.getNoPercent(true)">
|
||||
<uib-progressbar value="poll.getNoPercent(true)" type="danger"></uib-progressbar>
|
||||
</div>
|
||||
<!-- abstain -->
|
||||
<tr>
|
||||
<td class="icon">
|
||||
<strong style="font-size: 26px">∅</strong>
|
||||
<td>
|
||||
<span class="result_label"><translate>Abstain</translate>:</span>
|
||||
<span class="result_value">{{ poll.abstain }} {{ poll.getAbstainPercent() }}</span>
|
||||
<div ng-if="poll.getAbstainPercent(true)">
|
||||
<uib-progressbar value="poll.getAbstainPercent(true)" type="warning"></uib-progressbar>
|
||||
</div>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Title -->
|
||||
|
Loading…
Reference in New Issue
Block a user