Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new version of mockup from thet-pickadate-clearandset-2.1.x branch #1938

Merged
merged 1 commit into from
Feb 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Products/CMFPlone/profiles/dependencies/registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@
<value key="enabled">True</value>
<value key="jscompilation">++plone++static/plone-compiled.min.js</value>
<value key="csscompilation">++plone++static/plone-compiled.css</value>
<value key="last_compilation">2016-12-23 00:00:00</value>
<value key="last_compilation">2017-02-04 00:00:00</value>
<value key="stub_js_modules">
<element>jquery</element>
</value>
Expand All @@ -1077,7 +1077,7 @@
<value key="expression">python: member is not None</value>
<value key="jscompilation">++plone++static/plone-logged-in-compiled.min.js</value>
<value key="csscompilation">++plone++static/plone-logged-in-compiled.css</value>
<value key="last_compilation">2016-12-23 00:00:00</value>
<value key="last_compilation">2017-02-04 00:00:00</value>
<value key="depends">plone</value>
<value key="stub_js_modules">
<element>backbone</element>
Expand Down
2 changes: 1 addition & 1 deletion Products/CMFPlone/static/plone-compiled.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Products/CMFPlone/static/plone-compiled.css.map

Large diffs are not rendered by default.

80 changes: 48 additions & 32 deletions Products/CMFPlone/static/plone-compiled.js
Original file line number Diff line number Diff line change
Expand Up @@ -11829,9 +11829,10 @@ define('translate',[
* autoSetTimeOnDateChange(string): Automatically set the time when a date is set. You can specify an offset with a special syntax - a stringified JSON Array in the form of "[H,M]" will set it to hour:minute. If you prepend an "+" or "-", this will added or subscracted to the current time. It does not go beyond 12:00am. ("+[0,0]").
* separator(string): Separator between date and time if both are enabled.
* (' ')
* classClearName(string): Class name of element that is generated by pattern. ('pattern-pickadate-clear')
* classClearName(string): Class applied to clear button. ('pattern-pickadate-clear')
* classDateName(string): Class applied to date input. ('pattern-pickadate-date')
* classDateWrapperName(string): Class applied to extra wrapper div around date input. ('pattern-pickadate-date-wrapper')
* classNowName(string): Class applied to now button. ('pattern-pickadate-now')
* classSeparatorName(string): Class applied to separator. ('pattern-pickadate-separator')
* classTimeName(string): Class applied to time input. ('pattern-pickadate-time')
* classTimeWrapperName(string): Class applied to wrapper div around time input. ('pattern-pickadate-time-wrapper')
Expand Down Expand Up @@ -11928,16 +11929,20 @@ define('mockup-patterns-pickadate',[
selectMonths: true,
formatSubmit: 'yyyy-mm-dd',
format: 'yyyy-mm-dd',
clear: _t('Clear'),
clear: false,
close: _t('Close'),
today: _t('Today'),
labelMonthNext: _t('Next month'),
labelMonthPrev: _t('Previous month'),
labelMonthSelect: _t('Select a month'),
labelYearSelect: _t('Select a year')
},
time: {},
time: {
clear: false
},
timezone: null,
titleClear: _t('Clear'),
titleNow: _t('Today'),
autoSetTimeOnDateChange: '+[0,0]',
classWrapperName: 'pattern-pickadate-wrapper',
classSeparatorName: 'pattern-pickadate-separator',
Expand All @@ -11948,6 +11953,7 @@ define('mockup-patterns-pickadate',[
classTimezoneName: 'pattern-pickadate-timezone',
classTimezoneWrapperName: 'pattern-pickadate-timezone-wrapper',
classClearName: 'pattern-pickadate-clear',
classNowName: 'pattern-pickadate-now',
placeholderDate: _t('Enter date...'),
placeholderTime: _t('Enter time...'),
placeholderTimezone: _t('Enter timezone...')
Expand Down Expand Up @@ -12041,15 +12047,15 @@ define('mockup-patterns-pickadate',[
onSet: function(e) {
if (e.select !== undefined) {
self.$date.attr('data-value', e.select);
if (self.options.time === false ||
self.$time.attr('data-value') !== '') {
self.updateValue.call(self);
}
if (self.options.autoSetTimeOnDateChange !== false && self.$time) {
if (! self.$time.pickatime('picker').get('select')) {
self.$time.pickatime('picker').set('select', self.options.autoSetTimeOnDateChange);
}
}
if (self.options.time === false ||
self.$time.attr('data-value') !== '') {
self.updateValue.call(self);
}
}
if (e.hasOwnProperty('clear')) {
self.$el.val('');
Expand Down Expand Up @@ -12153,8 +12159,23 @@ define('mockup-patterns-pickadate',[
}
}

self.$clear = $('<div/>')
self.$now = $('<button class="btn btn-xs btn-info" title="' + self.options.titleNow + '"><span class="glyphicon glyphicon-time"></span></button>')
.addClass(self.options.classNowName)
.on('click', function (e) {
e.preventDefault();
var now = new Date();
if (self.$date) { self.$date.data('pickadate').set('select', now); }
if (self.$time) { self.$time.data('pickatime').set('select', now); }
})
.appendTo(self.$wrapper);

self.$clear = $('<button class="btn btn-xs btn-danger" title="' + self.options.titleClear + '"><span class="glyphicon glyphicon-trash"></span></button>')
.addClass(self.options.classClearName)
.on('click', function (e) {
e.preventDefault();
if (self.$date) { self.$date.data('pickadate').clear(); }
if (self.$time) { self.$time.data('pickatime').clear(); }
})
.appendTo(self.$wrapper);

},
Expand Down Expand Up @@ -13206,7 +13227,6 @@ define('mockup-patterns-formautofocus',[
* Options:
* external_links_open_new_window(boolean): Open external links in a new window. (false)
* mark_special_links(boolean): Marks external or special protocl links with class. (true)
* selector(string): Select an area of the page to enable this feature on (#main-container)
*
* Documentation:
* # General
Expand Down Expand Up @@ -13294,8 +13314,7 @@ define('mockup-patterns-markspeciallinks',[
parser: 'mockup',
defaults: {
external_links_open_new_window: false,
mark_special_links: true,
selector: '#main-container'
mark_special_links: true
},
init: function () {
var self = this, $el = self.$el;
Expand All @@ -13310,49 +13329,46 @@ define('mockup-patterns-markspeciallinks',[
res;

if (typeof self.options.external_links_open_new_window === 'string') {
elonw = self.options.external_links_open_new_window.toLowerCase() === 'true';
elonw = self.options.external_links_open_new_window.toLowerCase() === 'true';
} else if (typeof self.options.external_links_open_new_window === 'boolean') {
elonw = self.options.external_links_open_new_window;
elonw = self.options.external_links_open_new_window;
}

if (typeof self.options.mark_special_links === 'string') {
msl = self.options.mark_special_links.toLowerCase() === 'true';
msl = self.options.mark_special_links.toLowerCase() === 'true';
} else if (typeof self.options.mark_special_links === 'boolean') {
msl = self.options.mark_special_links;
msl = self.options.mark_special_links;
}

url = window.location.protocol + '//' + window.location.host;
protocols = /^(mailto|ftp|news|irc|h323|sip|callto|https|feed|webcal)/;
contentarea = $el;
if(self.options.selector){
contentarea = $(self.options.selector, contentarea);
}

if (elonw) {
// all http links (without the link-plain class), not within this site
contentarea.find('a[href^="http"]:not(.link-plain):not([href^="' + url + '"])').attr('target', '_blank');
// all http links (without the link-plain class), not within this site
contentarea.find('a[href^="http"]:not(.link-plain):not([href^="' + url + '"])')
.attr('target', '_blank');
}

if (msl) {
// All links with an http href (without the link-plain class), not within this site,
// and no img children should be wrapped in a link-external span
contentarea.find(
'a[href^="http:"]:not(.link-plain):not([href^="' + url + '"]):not(:has(img))')
.before('<i class="glyphicon link-external"></i>');
'a[href^="http:"]:not(.link-plain):not([href^="' + url + '"]):not(:has(img))')
.before('<i class="glyphicon link-external"></i>');
// All links without an http href (without the link-plain class), not within this site,
// and no img children should be wrapped in a link-[protocol] span
contentarea.find(
'a[href]:not([href^="http"]):not(.link-plain):not([href^="' + url + '"]):not(:has(img))')
.each(function() {
// those without a http link may have another interesting protocol
// wrap these in a link-[protocol] span
var href = $(this).attr('href');
res = protocols.exec(href);
if(res) {
var iconclass = 'glyphicon link-' + res[0];
$(this).before('<i class="' + iconclass + '"></i>');
'a[href]:not([href^="http:"]):not(.link-plain):not([href^="' + url + '"]):not(:has(img))')
.each(function() {
// those without a http link may have another interesting protocol
// wrap these in a link-[protocol] span
res = protocols.exec(this.href);
if (res) {
var iconclass = 'glyphicon link-' + res[0];
$(this).before('<i class="' + iconclass + '"></i>');
}
}
}
);
}
}
Expand Down
18 changes: 9 additions & 9 deletions Products/CMFPlone/static/plone-compiled.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Products/CMFPlone/static/plone-compiled.min.js.map

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions Products/CMFPlone/static/plone-logged-in-compiled.js
Original file line number Diff line number Diff line change
Expand Up @@ -71959,24 +71959,6 @@ define('mockup-patterns-tooltip',[
], function($, Base, undefined) {
'use strict';

var Tooltip = Base.extend({
name: 'tooltip',
trigger: '.pat-tooltip',
parser: 'mockup',
defaults: {
html: false
},
init: function() {
if (this.options.html === 'true') {
// TODO: fix the parser!
this.options.html = true;
} else {
this.options.html = false;
}
this.data = new bootstrapTooltip(this.$el[0], this.options);
},
});

//This is pulled almost directly from the Bootstrap Tooltip
//extension. We rename it just to differentiate from the pattern.
var bootstrapTooltip = function (element, options) {
Expand Down Expand Up @@ -72389,6 +72371,24 @@ define('mockup-patterns-tooltip',[
this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
}

var Tooltip = Base.extend({
name: 'tooltip',
trigger: '.pat-tooltip',
parser: 'mockup',
defaults: {
html: false
},
init: function() {
if (this.options.html === 'true') {
// TODO: fix the parser!
this.options.html = true;
} else {
this.options.html = false;
}
this.data = new bootstrapTooltip(this.$el[0], this.options);
},
});

return Tooltip;

});
Expand Down Expand Up @@ -80138,5 +80138,5 @@ require([
'use strict';
});

define("/Users/alec/Development/bundles/buildout.coredev/src/Products.CMFPlone/Products/CMFPlone/static/plone-logged-in.js", function(){});
define("/home/_thet/data/dev/fhnw/plone-5.0/src/Products.CMFPlone/Products/CMFPlone/static/plone-logged-in.js", function(){});

54 changes: 27 additions & 27 deletions Products/CMFPlone/static/plone-logged-in-compiled.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.