Merge branch 'hotfix/4.8.1'
This commit is contained in:
@@ -108,7 +108,8 @@
|
||||
"rangeCurrency": "Range Currency",
|
||||
"wysiwyg": "Wysiwyg",
|
||||
"map": "Map",
|
||||
"number": "Number"
|
||||
"number": "Number",
|
||||
"colorpicker": "Color Picker"
|
||||
},
|
||||
"fields": {
|
||||
"type": "Type",
|
||||
|
||||
@@ -33,5 +33,10 @@
|
||||
"path": "client/lib/gridstack.min.js",
|
||||
"exportsTo": "$",
|
||||
"exportsAs": "gridstack"
|
||||
},
|
||||
"Colorpicker": {
|
||||
"path": "client/lib/bootstrap-colorpicker.js",
|
||||
"exportsTo": "$",
|
||||
"exportsAs": "colorpicker"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"params": [
|
||||
{
|
||||
"name":"required",
|
||||
"type":"bool",
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"name":"default",
|
||||
"type":"colorpicker"
|
||||
},
|
||||
{
|
||||
"name":"audited",
|
||||
"type":"bool"
|
||||
},
|
||||
{
|
||||
"name":"readOnly",
|
||||
"type":"bool"
|
||||
}
|
||||
],
|
||||
"filter": false,
|
||||
"fieldDefs": {
|
||||
"type":"varchar",
|
||||
"maxLength": 7
|
||||
},
|
||||
"notCreatable": true
|
||||
}
|
||||
@@ -70,5 +70,5 @@
|
||||
"type":"datetime",
|
||||
"notNull":false
|
||||
},
|
||||
"view": "Fields.DatetimeOptional"
|
||||
"view": "views/fields/datetime-optional"
|
||||
}
|
||||
|
||||
Vendored
+1325
File diff suppressed because it is too large
Load Diff
@@ -16,15 +16,13 @@
|
||||
print ("{{translate \""+cell.name+"\" scope=\""+model.name+"\" category='fields'}}");
|
||||
}
|
||||
%></span></label>
|
||||
<div class="field<% if (cell.name) { %>{{#if hiddenFields.<%= cell.name %>}} hidden{{/if}}<% } %>" data-name="<%= cell.name %>">
|
||||
<%
|
||||
<div class="field<% if (cell.name) { %>{{#if hiddenFields.<%= cell.name %>}} hidden{{/if}}<% } %>" data-name="<%= cell.name %>"><%
|
||||
if ('customCode' in cell) {
|
||||
print (cell.customCode);
|
||||
} else {
|
||||
print ("{{{"+cell.name+"}}}");
|
||||
}
|
||||
%>
|
||||
</div>
|
||||
%></div>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<div class="col-sm-6"></div>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{{#if isNotEmpty}}<span>{{value}}</span> <span class="color-icon glyphicon glyphicon-tint" style="color: {{value}}"></span>{{else}}{{translate 'None'}}{{/if}}
|
||||
@@ -0,0 +1,4 @@
|
||||
<div class="input-group colorpicker-component">
|
||||
<input type="text" class="main-element form-control" name="{{name}}" value="{{value}}" {{#if params.maxLength}} maxlength="{{params.maxLength}}"{{/if}} autocomplete="off">
|
||||
<span class="input-group-addon"><i></i></span>
|
||||
</div>
|
||||
@@ -0,0 +1,54 @@
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM 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 General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
Espo.define('views/fields/colorpicker', ['views/fields/varchar', 'lib!Colorpicker'], function (Dep, Colorpicker) {
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
type: 'varchar',
|
||||
|
||||
detailTemplate: 'fields/colorpicker/detail',
|
||||
|
||||
listTemplate: 'fields/colorpicker/detail',
|
||||
|
||||
editTemplate: 'fields/colorpicker/edit',
|
||||
|
||||
forceTrim: true,
|
||||
|
||||
afterRender: function () {
|
||||
Dep.prototype.afterRender.call(this);
|
||||
if (this.mode == 'edit') {
|
||||
this.$element.parent().colorpicker({
|
||||
format: 'hex'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -83,7 +83,7 @@ Espo.define('views/fields/varchar', 'views/fields/base', function (Dep) {
|
||||
fetch: function () {
|
||||
var data = {};
|
||||
var value = this.$element.val();
|
||||
if (this.params.trim) {
|
||||
if (this.params.trim || this.forceTrim) {
|
||||
if (typeof value.trim === 'function') {
|
||||
value = value.trim();
|
||||
}
|
||||
|
||||
@@ -4,4 +4,5 @@
|
||||
@import "misc/datepicker/datepicker.less";
|
||||
@import "misc/timepicker/timepicker.less";
|
||||
@import "misc/timeline/timeline.less";
|
||||
@import "misc/fullcalendar/fullcalendar.less";
|
||||
@import "misc/fullcalendar/fullcalendar.less";
|
||||
@import "misc/colorpicker/colorpicker.less";
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user