Skip to content

Commit

Permalink
Added new fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersirka committed Jun 23, 2023
1 parent 4701281 commit 97b9f06
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 220 deletions.
15 changes: 6 additions & 9 deletions app.bundle

Large diffs are not rendered by default.

134 changes: 0 additions & 134 deletions definitions/func.js

This file was deleted.

3 changes: 1 addition & 2 deletions definitions/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ LOADCONFIG(db.config);
MAIN.cache = {};

// UI components
COMPONENTATOR('ui', 'exec,locale,aselected,floatingbox,page,viewbox,input,importer,box,cloudeditorsimple,validate,loading,intranetcss,notify,message,errorhandler,empty,menu,colorpicker,icons,miniform,clipboard,approve,columns,iframepreview,search,searchinput,fileuploader,formdata,filesaver,filereader,ready,datagrid,stats7,directory,datepicker,preview,pagination,intro', true);
COMPONENTATOR('ui', 'exec,locale,aselected,floatingbox,viewbox,page,input,importer,box,cloudeditorsimple,validate,loading,intranetcss,notify,message,errorhandler,empty,menu,colorpicker,icons,miniform,clipboard,approve,columns,iframepreview,search,searchinput,fileuploader,formdata,filesaver,filereader,ready,datagrid,stats7,directory,datepicker,preview,pagination,intro', true);

// Permissions
ON('ready', function() {
Expand All @@ -39,5 +39,4 @@ ON('ready', function() {
if (item.permissions)
OpenPlatform.permissions.push.apply(OpenPlatform.permissions, item.permissions);
}
FUNC.refresh();
});
22 changes: 14 additions & 8 deletions plugins/banners/public/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
.CLASS .campaigns .status { width: 166px; float: left; border-right: 1px solid #E0E0E0; margin-right: 10px; margin-top: 2px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; color: #000; }
.CLASS .campaigns .active { color: #000; }
.CLASS .campaigns .active .status { color: var(--color); }
.CLASS .campaigns .stats { width: 86px; text-align: right; float: right; border-left: 1px solid #e0e0e0; font-size: 11px; margin-top: 3px; padding-left: 10px; }
.CLASS .campaigns .stats span { margin-right: 10px; }
.CLASS .campaigns .date { font-size: 11px; border-left: 1px solid #e0e0e0; padding-left: 10px; margin-left: 10px; line-height: 21px; /* width: 100px; */float: right; color: #777; margin-right: 10px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; text-align: right; }
.CLASS .campaigns .views { width: 86px; text-align: right; float: right; border-left: 1px solid #e0e0e0; font-size: 11px; margin-top: 3px; padding-left: 10px; }
.CLASS .campaigns .views span { margin-right: 10px; }
.CLASS .campaigns .clicks { width: 86px; text-align: right; float: right; border-left: 1px solid #e0e0e0; font-size: 11px; margin-top: 3px; padding-left: 10px; }
.CLASS .campaigns .date { width: 83px; font-size: 11px; border-left: 1px solid #e0e0e0; padding-left: 10px; margin-left: 10px; line-height: 21px; float: right; color: #777; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; text-align: right; }
.CLASS .campaigns .limit { width: 95px; font-size: 11px; border-left: 1px solid #e0e0e0; padding-left: 10px; margin-left: 10px; line-height: 21px; float: right; color: #777; text-align: right; margin-right: 10px; }
.CLASS .campaigns .name { line-height: 21px; float: left; }
.CLASS .campaigns .name > span { margin-right: 5px; display: inline-block; max-width: 650px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.CLASS .campaigns .options { float: right; margin-top: 2px; padding-left: 10px; border-left: 1px solid #e0e0e0; }
Expand Down Expand Up @@ -57,7 +59,7 @@
.CLASS header label .size { font-size: 11px; }
.CLASS .listing figure section { position: relative; height: 50px !important; }
.CLASS .campaigns .status { width: 30px; }
.CLASS .campaigns .date { position: absolute; bottom: 2px; left: 25px; border-left: 0; }
.CLASS .campaigns .date { width: auto; position: absolute; bottom: 2px; left: 25px; border-left: 0; }
.CLASS .campaigns .options { border-left: 0; }
.CLASS .ui-pagination { padding: 0 !important; }
.CLASS .search { max-width: 100%; }
Expand Down Expand Up @@ -180,19 +182,23 @@
<div class="options">
<i class="ti ti-cog exec" data-exec="?/options" data-prevent="true"></i>
</div>
<div class="limit">
<span>{{ if m.dtend }}<span title="@(Campaign end date)">{{ m.dtend | format('dd.MM.yyyy')}}</span>{{ else }}<span title="@(Limit)">{{ m.count }} {{ m.limit }}</span>{{ fi }}</span>
</div>
<div class="date">
<span title="@(Campaign start date)"><i class="ti ti-clock mr5"></i>{{ m.dtbeg | format('dd.MM.yyyy') }}</span>
<span> - </span>
<span>{{ if m.dtend }}<span title="@(Campaign end date)">{{ m.dtend | format('dd.MM.yyyy')}}</span>{{ else }}<span title="@(Campaign end)">{{ m.count }} {{ m.limit }}</span>{{ fi }}</span>
</div>

<div class="prediction hidden-sm">
<span class="mr5">@(Prediction:)</span>
<span>{{ m.prediction }}</span>
</div>
<div class="stats hidden-sm">
<span title="@(Campaign views)"><i class="ti ti-eye mr5"></i>{{ m.views }}</span>
<div class="clicks hidden-sm">
<span title="@(Campaign clicks)"><i class="ti ti-pointer mr5"></i>{{ m.clicks }}</span>
</div>
<div class="views hidden-sm">
<span title="@(Campaign views)"><i class="ti ti-eye mr5"></i>{{ m.views }}</span>
</div>
<div class="customer hidden-sm">
{{ if m.customer }}<span class="badge badge-small badge-silver ml5" title="@(Customer)">{{ m.customer }}</span>{{ fi }}
</div>
Expand Down
16 changes: 6 additions & 10 deletions plugins/banners/public/forms/campaign.html
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
<style>
.CLASS .upload-photo-container { margin: 0 auto; max-width: 100%; }
.CLASS .upload-photo-container img { margin: 0 auto; }
.CLASS .prediction { display: flex; align-items: center; justify-content: space-between; padding: 10px 15px; background-color: var(--color); border-radius: var(--radius); color: #fff; }
.CLASS .prediction { display: flex; align-items: center; justify-content: space-between; padding: 10px 15px; background-color: #F0F0F0; border-radius: var(--radius); }
</style>

<ui-component name="box" path="common.form" config="if:~PATH~;icon:ti ti-game-board-alt;autofocus:1;reload:?/reload;closeesc:1;scrollbar:1;submit:?/submit;width:760" class="hidden ~PATH~" plugin="~PATH~">
<div class="padding bg-smoke">
<br />
<div class="upload-photo-container">
<ui-component name="preview" path="?.photo" config="required:1;=width:?.width;=height:?.height;keeporiginal:1;url:/api/upload/;output:file;map:value.url"></ui-component>
<ui-component name="preview" path="?.photo" config="required:1;=width:?.width;=height:?.height;keeporiginal:1;url:[upload];output:file;map:value.url"></ui-component>
<div class="help center">@(By click on the square you can upload the image) (<ui-bind path="?.size" config="html"></ui-bind>)</div>
</div>
<br />
</div>

<div class="padding npb">

<ui-component name="input" path="?.name" config="required:1;placeholder:@(Enter advert name)" class="m">@(Name)</ui-component>
<ui-component name="input" path="?.name" config="required:1" class="m">@(Name)</ui-component>
<ui-component name="input" path="?.url" config="required:1" default="'https://'" class="m">@(URL address)</ui-component>

<div class="row">
<div class="col-sm-6 m">
<ui-component name="input" path="?.customer" config="placeholder:@(Total Avengers)">@(Customer)</ui-component>
<ui-component name="input" path="?.customer">@(Customer)</ui-component>
</div>
<div class="col-sm-6 m">
<ui-component name="input" path="?.note">@(Note)</ui-component>
</div>
</div>
</div>

<hr class="nmt"/>

<div class="padding npt">
<div class="prediction dflex">
<div>
<i class="fas fa-chart-line mr5"></i>
Expand All @@ -52,7 +48,7 @@
</div>
</div>

<div class="padding npt">
<div class="padding">
<div class="row">
<div class="col-sm-4">
<ui-component name="input" path="?.dtbeg" config="required:1;type:date" default="NOW" class="m">@(Begin)</ui-component>
Expand All @@ -68,7 +64,7 @@
</ui-bind>
</div>
<ui-component name="input" path="?.ignore" config="transform:lowercase" default="''">@(Ignore list)</ui-component>
<div class="help">@(Separate words by a comma. The system searches terms in the website URL, and if the word is matched, it skips the website advert.)</div>
<div class="help">@(Separate words by a comma. The system searches terms in the website URL and document title, and if the word is matched, it skips the website advert.)</div>
</div>

<nav>
Expand Down
1 change: 1 addition & 0 deletions plugins/banners/schemas/banners.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ NEWSCHEMA('Banners', function(schema) {

if (MAIN.db.banners[params.id]) {
delete MAIN.db.banners[params.id];
DATA.remove('nosql/campaigns').where('bannerid', params.id);
MAIN.db.save();
EMIT('banners_refresh');
$.success();
Expand Down
52 changes: 0 additions & 52 deletions public/js/func.js

This file was deleted.

Loading

0 comments on commit 97b9f06

Please sign in to comment.