From e1a91256d03a99d9fb42ac9ed40dc4e834404ce7 Mon Sep 17 00:00:00 2001 From: Charu Date: Thu, 31 Dec 2020 01:46:27 +0530 Subject: [PATCH] responsive on mobile screens --- dist/PublicLab.Editor.js | 56 ++--- examples/index.html | 434 ++++++++++++++++++++------------------- package-lock.json | 2 +- 3 files changed, 253 insertions(+), 239 deletions(-) diff --git a/dist/PublicLab.Editor.js b/dist/PublicLab.Editor.js index 96f208b0..e71eef3f 100644 --- a/dist/PublicLab.Editor.js +++ b/dist/PublicLab.Editor.js @@ -11522,7 +11522,7 @@ module.exports = tokenizeLinks; },{}],114:[function(require,module,exports){ //! moment.js -//! version : 2.27.0 +//! version : 2.29.1 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com @@ -14063,8 +14063,7 @@ module.exports = tokenizeLinks; hooks.createFromInputFallback = deprecate( 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + - 'discouraged and will be removed in an upcoming major release. Please refer to ' + - 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', + 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) { config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); } @@ -15249,7 +15248,10 @@ module.exports = tokenizeLinks; function calendar$1(time, formats) { // Support for single parameter, formats only overload to the calendar function if (arguments.length === 1) { - if (isMomentInput(arguments[0])) { + if (!arguments[0]) { + time = undefined; + formats = undefined; + } else if (isMomentInput(arguments[0])) { time = arguments[0]; formats = undefined; } else if (isCalendarSpec(arguments[0])) { @@ -15927,7 +15929,7 @@ module.exports = tokenizeLinks; eras = this.localeData().eras(); for (i = 0, l = eras.length; i < l; ++i) { // truncate time - val = this.startOf('day').valueOf(); + val = this.clone().startOf('day').valueOf(); if (eras[i].since <= val && val <= eras[i].until) { return eras[i].name; @@ -15947,7 +15949,7 @@ module.exports = tokenizeLinks; eras = this.localeData().eras(); for (i = 0, l = eras.length; i < l; ++i) { // truncate time - val = this.startOf('day').valueOf(); + val = this.clone().startOf('day').valueOf(); if (eras[i].since <= val && val <= eras[i].until) { return eras[i].narrow; @@ -15967,7 +15969,7 @@ module.exports = tokenizeLinks; eras = this.localeData().eras(); for (i = 0, l = eras.length; i < l; ++i) { // truncate time - val = this.startOf('day').valueOf(); + val = this.clone().startOf('day').valueOf(); if (eras[i].since <= val && val <= eras[i].until) { return eras[i].abbr; @@ -15990,7 +15992,7 @@ module.exports = tokenizeLinks; dir = eras[i].since <= eras[i].until ? +1 : -1; // truncate time - val = this.startOf('day').valueOf(); + val = this.clone().startOf('day').valueOf(); if ( (eras[i].since <= val && val <= eras[i].until) || @@ -17141,7 +17143,7 @@ module.exports = tokenizeLinks; //! moment.js - hooks.version = '2.27.0'; + hooks.version = '2.29.1'; setHookCallback(createLocal); @@ -22654,7 +22656,7 @@ module.exports = { },{}],185:[function(require,module,exports){ var builder = ''; builder += '
'; builder += ''; builder += ''; -builder += ''; +builder += ''; builder += ''; builder += '
'; module.exports = builder; @@ -22754,7 +22756,7 @@ module.exports = function CustomInsert(_module, wysiwyg) { } }); const builder = require("./PublicLab.CustomInsert.Template.js"); - $('.wk-commands').append('
'); + $('.wk-commands').append(''); var Option1 = "Notes"; var Option2 = "List"; $('.woofmark-command-insert').attr('data-content', builder); @@ -22825,10 +22827,10 @@ module.exports = PublicLab.MainImageModule = PublicLab.Module.extend({ _module.image.onload = function() { var heightDropdown = this.height; var widthDropdown = this.width; - if (this.width > 340) { - var aspectRatio = this.width / 340; - widthDropdown = 340; - heightDropdown = this.height / aspectRatio; + if (this.height > 180) { + var aspectRatio = this.height / 180; + widthDropdown = this.width / aspectRatio; ; + heightDropdown = 180; } _module.dropEl.css('height', heightDropdown); _module.dropEl.css('width', widthDropdown); @@ -23110,7 +23112,7 @@ module.exports = function initAutoCenter(_module, wysiwyg) { // $('.woofmark-mode-markdown').removeClass('disabled') // create a menu option for auto center: - $('.wk-commands').append(''); + $('.wk-commands').append(''); // since chunk.selection returns null for images $(document).ready(function() { @@ -23243,7 +23245,7 @@ module.exports = function initAutoCenter(_module, wysiwyg) { module.exports = function initEmbed(_module, wysiwyg) { // create a menu option for embeds: - $('.wk-commands').append(''); + $('.wk-commands').append(''); $(document).ready(function() { $('[data-toggle="youtube"]').tooltip(); @@ -23274,7 +23276,7 @@ module.exports = function initEmbed(_module, wysiwyg) { module.exports = function initHorizontalRule(_module, wysiwyg) { // create a menu option for horizontal rules: - $('.wk-commands').append(''); + $('.wk-commands').append(''); $(document).ready(function() { $('[data-toggle="horizontal"]').tooltip(); @@ -23334,17 +23336,17 @@ module.exports = function initTables(_module, wysiwyg) { // create a submenu for sizing tables - $('.wk-commands').append(''); + $('.wk-commands').append(''); $(document).ready(function() { $('[data-toggle="table"]').tooltip(); }); var builder = '
'; - builder += ' 4 '; + builder += ' 4 '; builder += ' x '; - builder += ' 3 '; - builder += ' Add'; + builder += ' 3 '; + builder += ' Add'; builder += '
'; $('.woofmark-command-table').attr('data-content', builder); @@ -23422,7 +23424,7 @@ module.exports = PublicLab.RichTextModule = PublicLab.Module.extend({ icon: "clock-o", position: 90, text: - "Your work is auto-saved so you can return to it in this browser. To recover drafts, open the menu below." + "Your work is auto-saved so you can return to it in this browser. To recover drafts, open the menu below." } ]; @@ -23882,7 +23884,7 @@ module.exports = function relatedNodes(module) { relatedEl.find('.result').remove(); relatedResults.slice(0, 8).forEach(function(result) { - relatedEl.append('
Add by
'); + relatedEl.append('
Add by
'); relatedEl.find('.result-' + result.id + ' .title').html(result.title); relatedEl.find('.result-' + result.id + ' .title').attr('href', result.url); relatedEl.find('.result-' + result.id + ' .author').html('@' + result.author); @@ -24017,7 +24019,7 @@ module.exports = PublicLab.TitleModule = PublicLab.Module.extend({ _module.menuEl = _module.el.find('.ple-menu-more'); // a "more tools" menu, not currently used: - // _module.menuEl.append('...'); + // _module.menuEl.append('...'); $(_module.el).find('input').keydown(function(e) { _editor.validate(); diff --git a/examples/index.html b/examples/index.html index 925ceae2..ee4b8424 100644 --- a/examples/index.html +++ b/examples/index.html @@ -17,9 +17,9 @@ /> + href="../node_modules/woofmark/dist/woofmark.min.css" + rel="stylesheet" + /> - + @@ -60,40 +63,37 @@ href="../node_modules/at.js/dist/css/jquery.atwho.min.css" rel="stylesheet" /> + -
+

Share

- -
- -
-
+ +
+
+ -
- + + +
@@ -113,17 +113,17 @@

Share

-
-

1

-
+
+

1

+
-
- -
+
+ +
@@ -131,149 +131,155 @@

1

-
-

2

-
-
-
-
- Drag an image here to upload. -
+
+

2

-
-
-
-

3

-
+
+

3

+
-
- -

- - Search location through place name , latitude and longitude or - by panning the map . - -

- -
-
-
-
-
-
-

By place name :

-

- -

-

-

By entering co-ordinates :

-
-
-

- -

-
-
-

- -

-
+
+ +

+ + Search location through place name , latitude and longitude or + by panning the map . + +

+ +
+
+
+
-
-

- -

- -
- - Learn more +
+

+ +

+
+
+
+

+ +

+ +
+ + Learn more +
-
-
-

4

-
+
+

4

+
-
- -
+ > +
@@ -306,62 +312,62 @@

4

-
-

5

-
-
- -
+
+

5

+
+
+ +
-
-
- -
+ - diff --git a/package-lock.json b/package-lock.json index b4be3d0c..09e320a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "publiclab-editor", - "version": "2.2.0", + "version": "3.0.0", "lockfileVersion": 1, "requires": true, "dependencies": {