Skip to content

Commit

Permalink
Format corrections for popups
Browse files Browse the repository at this point in the history
  • Loading branch information
ravibail committed Sep 10, 2019
1 parent 7a06d9b commit c724c23
Show file tree
Hide file tree
Showing 13 changed files with 167 additions and 187 deletions.
10 changes: 5 additions & 5 deletions public/app/js/controllers/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,13 +472,13 @@ angular.module('piAssets.controllers',[])
$scope.today = new Date().toISOString().split("T")[0];
$scope.$watch("forAsset.fileDetails.validity.startdate", function(value,oldvalue) {
if (value && (!oldvalue || (value.getTime() != oldvalue.getTime()))) {
$scope.forAsset.filesDetails.validity.starthour = 0;
$scope.forAsset.fileDetails.validity.starthour = 0;
var endday = new Date(value);
$scope.endday = endday.toISOString().split("T")[0];
if (!$scope.forAsset.filesDetails.validity.enddate ||
value > $scope.forAsset.filesDetails.validity.enddate) {
$scope.forAsset.filesDetails.validity.enddate = endday;
$scope.forAsset.filesDetails.validity.endhour = 24;
if (!$scope.forAsset.fileDetails.validity.enddate ||
value > $scope.forAsset.fileDetails.validity.enddate) {
$scope.forAsset.fileDetails.validity.enddate = endday;
$scope.forAsset.fileDetails.validity.endhour = 24;
}
}
});
Expand Down
80 changes: 27 additions & 53 deletions public/app/partials/asset-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,16 @@
<iframe ng-if="filedetails.type==&quot;html&quot;" ng-src="{{ filedetails.path }}"></iframe>
<iframe ng-if="filedetails.type==&quot;pdf&quot;" height="300px" width="100%" ng-src="{{filedetails.path}}"></iframe>
<form role="form" name="linkform" ng-show="fileType==&quot;link&quot;">
<div ng-if="urlLink.type != '.txt'" class="row">
<div class="col-sm-3 text-right">
<label class="control-label text-muted">Address</label>
</div>
<div class="col-xs-8">
<h4>{{urlLink.link}}<a ng-disabled="!urlLink.link" href="{{urlLink.link}}" target="_blank" class="btn btn-link"><i class="fa fa-external-link"></i></a></h4>
</div>
<div ng-if="urlLink.type != '.txt'" class="form-group row">
<label class="control-label text-muted col-sm-3 text-right"><small>Address</small></label>
<div class="col-xs-8"><span>{{urlLink.link}}<a ng-disabled="!urlLink.link" href="{{urlLink.link}}" target="_blank" class="btn btn-link"><i class="fa fa-external-link"></i></a></span></div>
</div>
<div class="row">
<div class="col-sm-3 text-right">
<label class="control-label text-muted">Type</label>
</div>
<div class="col-xs-7">
<h4>{{urlLink.type == ".tv"?"You Tube":urlLink.type.slice(1)}}</h4>
</div>
<div class="form-group row">
<label class="control-label text-muted col-sm-3 text-right"><small>Type</small></label>
<div class="col-xs-7"><span>{{urlLink.type == ".tv"?"You Tube":urlLink.type.slice(1)}}</span></div>
</div>
<div ng-if="urlLink.type == '.mrss'" class="row">
<div class="col-sm-3 text-right">
<h4 class="text-muted">RSS Text</h4>
</div>
<div ng-if="urlLink.type == '.mrss'" class="form-group row">
<label class="control-label text-muted col-sm-3 text-right"><small>RSS Text</small></label>
<div class="col-sm-9">
<div class="radio-inline">
<label>
Expand Down Expand Up @@ -61,57 +51,45 @@ <h4 class="text-muted">RSS Text</h4>
</div>
</div>
</div>
<div ng-if="urlLink.type == '.mrss'" class="row">
<div class="col-sm-3 text-right">Number of Items</div>
<div ng-if="urlLink.type == '.mrss'" class="form-group row">
<label class="control-label text-muted col-sm-3 text-right"><small>Number of Items</small></label>
<div class="col-sm-3">
<input type="number" name="count" placeholder="{{&quot;Number of Items to show&quot; }}" ng-model="urlLink.numberOfItems" class="form-control"/>
</div>
<div class="col-sm-3 text-right">
<h4 class="text-muted">Item duration (use playlist duration & number of items instead after 2.4.0)</h4>
</div>
<label class="control-label text-muted col-sm-3 text-right"><small>Item duration (use playlist duration & number of items instead after 2.4.0)</small></label>
<div class="col-sm-3">
<input type="number" name="duration" placeholder="{{&quot;Duration of each feed item&quot;}}" ng-model="urlLink.duration" class="form-control"/>
</div>
</div>
<div ng-if="urlLink.type == '.txt'|| urlLink.type == '.mrss'" class="row">
<div class="col-sm-3 text-right">
<label class="control-label">Optional CSS</label>
</div>
<div ng-if="urlLink.type == '.txt'|| urlLink.type == '.mrss'" class="form-group row">
<label class="control-label text-muted col-sm-3 text-right"><small>Optional CSS</small></label>
<div class="col-sm-6">
<input type="text" name="style" placeholder="e.g. color:#eee; font-style:italic;" ng-model="urlLink.style" class="form-control"/>
</div>
</div>
<div ng-if="urlLink.type == '.txt'" class="row">
<div class="col-sm-3 text-right">
<label class="control-label">Message</label>
</div>
<div ng-if="urlLink.type == '.txt'" class="form-group row">
<label class="control-label text-muted col-sm-3 text-right"><small>Message</small></label>
<div class="col-sm-6">
<textarea rows="4" cols="50" name="message" ng-model="urlLink.message" required="" class="form-control"></textarea>
</div>
</div><br/>
<div ng-if="urlLink.type == '.weblink'" class="row">
<div class="col-sm-3 text-right">
<label class="control-label text-muted">Zoom level</label>
</div>
<div ng-if="urlLink.type == '.weblink'" class="form-group row">
<label class="control-label text-muted col-sm-3 text-right"><small>Zoom level</small></label>
<div class="col-sm-6">
<input type="number" step="0.01" name="style" placeholder="e.g. 0.75(75%), 1.25(125%) or leave blank for no-zoom" ng-model="urlLink.zoom" class="form-control"/>
</div>
</div><br/>
<div ng-if="urlLink.type == '.weblink'" class="row">
<div class="col-sm-3 text-right">
<label class="control-label">Send Key strokes (optional)</label>
</div>
<div ng-if="urlLink.type == '.weblink'" class="form-group row">
<label class="control-label text-muted col-sm-3 text-right"><small>Send Key strokes (optional)</small></label>
<div class="col-sm-5">
<input type="text" name="keystrokes" placeholder="e.g. tab,shift+h,e,l,l,o,shift+!,enter" ng-model="urlLink.keystrokes" class="form-control"/><small>for key definitions refer http://robotjs.io/docs/syntax#key</small>
</div>
<div class="col-sm-2">
<label class="control-label text-muted">after a delay of</label>
</div>
<label class="control-label text-muted col-sm-2 text-right"><small>after a delay of</small></label>
<div class="col-sm-2">
<input type="text" name="keydelay" placeholder="10 secs" ng-model="urlLink.keydelay" class="form-control"/>
</div>
</div><br/>
<div class="row">
<div class="form-group row">
<div class="col-sm-3 col-sm-offset-3">
<button ng-disabled="!(linkform.$dirty &amp;&amp; linkform.$valid)" ng-click="saveNewChanges()" class="btn btn-success">Update</button>
</div>
Expand Down Expand Up @@ -142,14 +120,10 @@ <h4 class="media-heading"><strong>{{item.summary}}</strong></h4>
</ul>
</div>
</div>
<div class="panel-footer">
<div class="row">
<div class="col-sm-10">
<categories selected-labels="selectedLabels"></categories>
</div>
<div class="col-sm-2 pull-right">
<button ng-click="save()" class="btn btn-success pull-right">DONE</button>
</div>
</div>
</div>
<!--.panel-footer-->
<!-- .row-->
<!-- .col-sm-10-->
<!-- categories(selected-labels="selectedLabels")-->
<!-- .col-sm-2.pull-right-->
<!-- button.btn.btn-success.pull-right(ng-click='save()') DONE-->
</div>
63 changes: 27 additions & 36 deletions public/app/partials/asset-details.jade
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,18 @@
iframe(ng-if='filedetails.type=="html"', ng-src='{{ filedetails.path }}')
iframe(ng-if='filedetails.type=="pdf"',height="300px",width="100%",ng-src='{{filedetails.path}}')
form(role="form",name="linkform",ng-show='fileType=="link"')
.row(ng-if="urlLink.type != '.txt'")
.col-sm-3.text-right
label.control-label.text-muted Address
.form-group.row(ng-if="urlLink.type != '.txt'")
label.control-label.text-muted.col-sm-3.text-right: small Address
.col-xs-8
h4 {{urlLink.link}}
span {{urlLink.link}}
a.btn.btn-link(ng-disabled='!urlLink.link',href="{{urlLink.link}}",target="_blank")
i.fa.fa-external-link
.row
.col-sm-3.text-right
label.control-label.text-muted Type
.form-group.row
label.control-label.text-muted.col-sm-3.text-right: small Type
.col-xs-7
h4 {{urlLink.type == ".tv"?"You Tube":urlLink.type.slice(1)}}
.row(ng-if="urlLink.type == '.mrss'")
.col-sm-3.text-right
h4.text-muted RSS Text
span {{urlLink.type == ".tv"?"You Tube":urlLink.type.slice(1)}}
.form-group.row(ng-if="urlLink.type == '.mrss'")
label.control-label.text-muted.col-sm-3.text-right: small RSS Text
.col-sm-9
.radio-inline
label
Expand All @@ -46,51 +43,45 @@
label
input(type='radio',name='radio_description_noimg', ng-model='urlLink.hideTitle', value="onlydescription")
small descr
.row(ng-if="urlLink.type == '.mrss'")
.col-sm-3.text-right Number of Items
.form-group.row(ng-if="urlLink.type == '.mrss'")
label.control-label.text-muted.col-sm-3.text-right: small Number of Items
.col-sm-3
input.form-control(type='number',name='count',placeholder='{{"Number of Items to show" }}',
ng-model='urlLink.numberOfItems')
.col-sm-3.text-right
h4.text-muted Item duration (use playlist duration & number of items instead after 2.4.0)
label.control-label.text-muted.col-sm-3.text-right: small Item duration (use playlist duration & number of items instead after 2.4.0)
.col-sm-3
input.form-control(type='number',name='duration',placeholder='{{"Duration of each feed item"}}',
ng-model='urlLink.duration')

.row(ng-if="urlLink.type == '.txt'|| urlLink.type == '.mrss'")
.col-sm-3.text-right
label.control-label Optional CSS
.form-group.row(ng-if="urlLink.type == '.txt'|| urlLink.type == '.mrss'")
label.control-label.text-muted.col-sm-3.text-right: small Optional CSS
.col-sm-6
input.form-control(type='text',name='style' ,placeholder='e.g. color:#eee; font-style:italic;',
ng-model='urlLink.style')

.row(ng-if="urlLink.type == '.txt'")
.col-sm-3.text-right
label.control-label Message
.form-group.row(ng-if="urlLink.type == '.txt'")
label.control-label.text-muted.col-sm-3.text-right: small Message
.col-sm-6
textarea.form-control( rows="4",cols="50",name='message', ng-model='urlLink.message', required='')

br
.row(ng-if="urlLink.type == '.weblink'")
.col-sm-3.text-right
label.control-label.text-muted Zoom level
.form-group.row(ng-if="urlLink.type == '.weblink'")
label.control-label.text-muted.col-sm-3.text-right: small Zoom level
.col-sm-6
input.form-control(type='number',step="0.01" ,name='style' ,placeholder='e.g. 0.75(75%), 1.25(125%) or leave blank for no-zoom',
ng-model='urlLink.zoom')

br
.row(ng-if="urlLink.type == '.weblink'")
.col-sm-3.text-right
label.control-label Send Key strokes (optional)
.form-group.row(ng-if="urlLink.type == '.weblink'")
label.control-label.text-muted.col-sm-3.text-right: small Send Key strokes (optional)
.col-sm-5
input.form-control(type="text",name="keystrokes",placeholder="e.g. tab,shift+h,e,l,l,o,shift+!,enter",ng-model="urlLink.keystrokes")
small for key definitions refer http://robotjs.io/docs/syntax#key
.col-sm-2
label.control-label.text-muted after a delay of
label.control-label.text-muted.col-sm-2.text-right: small after a delay of
.col-sm-2
input.form-control(type="text", name="keydelay", placeholder="10 secs", ng-model="urlLink.keydelay")
br
.row
.form-group.row
.col-sm-3.col-sm-offset-3
button.btn.btn-success(ng-disabled='!(linkform.$dirty && linkform.$valid)',ng-click="saveNewChanges()") Update

Expand All @@ -117,12 +108,12 @@
input(type="radio", name="email", ng-click='selectedCalendar(item.id)', ng-checked="calendar.selected == item.summary")


.panel-footer
.row
.col-sm-10
categories(selected-labels="selectedLabels")
.col-sm-2.pull-right
button.btn.btn-success.pull-right(ng-click='save()') DONE
//.panel-footer
// .row
// .col-sm-10
// categories(selected-labels="selectedLabels")
// .col-sm-2.pull-right
// button.btn.btn-success.pull-right(ng-click='save()') DONE
4 changes: 2 additions & 2 deletions public/app/partials/assets.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ <h3 class="panel-title">{{assetConfig.assets.assets.length}} Files in&nbsp;{{!as
{{file.fileDetails.type}},&nbsp;{{file.fileDetails.size}},&nbsp;
{{file.fileDetails.createdAt | date: 'MMM dd'}}</small></div>
<div class="col-sm-3">
<button title="{{'Add validity period for the asset'}}" ng-click="scheduleValidity(file)" class="btn btn-link btn-xs"><i class="fa fa-calendar">&nbsp;</i><small ng-if="!(file.fileDetails.validity.enable)">add validity</small><small ng-if="file.fileDetails.validity.enable">{{file.fileDetails.validity.startdate | date:'MMM d':'UTC'}}<small ng-if="file.filesDetails.validity.startdate &amp;&amp; file.filesDetails.validity.starthour">({{file.filesDetails.validity.starthour}}h)</small>-
{{file.fileDetails.validity.enddate | date:'MMM d':'UTC'}}<small ng-if="file.filesDetails.validity.enddate &amp;&amp; file.filesDetails.validity.endhour" class="text-muted">({{file.filesDetails.validity.endhour}}h)</small></small></button>
<button title="{{'Add validity period for the asset'}}" ng-click="scheduleValidity(file)" class="btn btn-link btn-xs"><i class="fa fa-calendar">&nbsp;</i><small ng-if="!(file.fileDetails.validity.enable)">add validity</small><small ng-if="file.fileDetails.validity.enable">{{file.fileDetails.validity.startdate | date:'MMM d':'UTC'}}<small ng-if="file.fileDetails.validity.startdate &amp;&amp; file.fileDetails.validity.starthour">({{file.fileDetails.validity.starthour}}h)</small>-
{{file.fileDetails.validity.enddate | date:'MMM d':'UTC'}}<small ng-if="file.fileDetails.validity.enddate &amp;&amp; file.fileDetails.validity.endhour" class="text-muted">({{file.fileDetails.validity.endhour}}h)</small></small></button>
</div>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions public/app/partials/assets.jade
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@
| add validity
small(ng-if='file.fileDetails.validity.enable')
| {{file.fileDetails.validity.startdate | date:'MMM d':'UTC'}}
small(ng-if='file.filesDetails.validity.startdate && file.filesDetails.validity.starthour')
| ({{file.filesDetails.validity.starthour}}h)
small(ng-if='file.fileDetails.validity.startdate && file.fileDetails.validity.starthour')
| ({{file.fileDetails.validity.starthour}}h)
| -
| {{file.fileDetails.validity.enddate | date:'MMM d':'UTC'}}
small.text-muted(ng-if='file.filesDetails.validity.enddate && file.filesDetails.validity.endhour')
| ({{file.filesDetails.validity.endhour}}h)
small.text-muted(ng-if='file.fileDetails.validity.enddate && file.fileDetails.validity.endhour')
| ({{file.fileDetails.validity.endhour}}h)



Expand Down
4 changes: 3 additions & 1 deletion public/app/partials/playlist-add.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ <h6>{{file.fileDetails.name }}</h6>
<label title="play in background" class="btn btn-link text-muted">
<input type="checkbox" ng-model="file.playlistDetails.option.main" ng-model-options="{ debounce: 500 }" ng-true-value="false" ng-false-value="true" ng-checked="file.playlistDetails.option.main !== true"/><span class="pl-5"> play in background</span>
</label>
<label ng-show="file.filesDetails.type == &quot;image&quot; || file.filesDetails.type == &quot;video&quot;" title="add a text message over image or video" class="btn btn-link text-muted">
</div>
<div ng-show="file.fileDetails.type == &quot;image&quot; || file.fileDetails.type == &quot;video&quot;" class="col-sm-3">
<label title="add a text message over image or video" class="btn btn-link text-muted">
<input type="text" ng-model="file.playlistDetails.option.bannerText" placeholder="text message over the image/video" ng-model-options="{ debounce: 500 }"/>
</label>
</div>
Expand Down
3 changes: 2 additions & 1 deletion public/app/partials/playlist-add.jade
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
ng-true-value="false", ng-false-value="true",
ng-checked="file.playlistDetails.option.main !== true")
span.pl-5 play in background
label.btn.btn-link.text-muted(ng-show='file.filesDetails.type == "image" || file.filesDetails.type == "video"', title='add a text message over image or video')
.col-sm-3(ng-show='file.fileDetails.type == "image" || file.fileDetails.type == "video"')
label.btn.btn-link.text-muted(title='add a text message over image or video')
input(type='text', ng-model='file.playlistDetails.option.bannerText',placeholder="text message over the image/video", ng-model-options="{ debounce: 500 }")
.col-sm-3(ng-show='file.fileDetails.type == "pdf"')
label.btn.btn-link.text-muted(title='use presentation mode')
Expand Down
Loading

0 comments on commit c724c23

Please sign in to comment.