[Libreoffice-commits] online.git: 4 commits - loleaflet/dist loleaflet/src
Pranav Kant
pranavk at collabora.co.uk
Sun Nov 20 09:25:05 UTC 2016
loleaflet/dist/spreadsheet.css | 10 +++-------
loleaflet/src/control/Control.Tabs.js | 22 ++++++----------------
2 files changed, 9 insertions(+), 23 deletions(-)
New commits:
commit 8f3b5bff4ca040941024467f8a66c4480295da5a
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Sun Nov 20 14:53:22 2016 +0530
loleaflet: Let readonly/view views change spreadsheet tabs too
Change-Id: If443a71a4e009657ec7d29582a96f4c23962cfe3
diff --git a/loleaflet/src/control/Control.Tabs.js b/loleaflet/src/control/Control.Tabs.js
index 296729d..c33495f 100644
--- a/loleaflet/src/control/Control.Tabs.js
+++ b/loleaflet/src/control/Control.Tabs.js
@@ -122,20 +122,11 @@ L.Control.Tabs = L.Control.extend({
if (part === selectedPart) {
L.DomUtil.addClass(this._spreadsheetTabs[key], 'spreadsheet-tab-selected');
}
-
- if (map._permission === 'edit') {
- L.DomUtil.removeClass(this._spreadsheetTabs[key], 'context-menu-disabled');
- } else {
- L.DomUtil.addClass(this._spreadsheetTabs[key], 'context-menu-disabled');
- }
}
}
},
_setPart: function (e) {
- if (map._permission !== 'edit') {
- return;
- }
var part = e.target.id.match(/\d+/g)[0];
if (part !== null) {
this._map.setPart(parseInt(part));
commit 4e945eefdf4ee7f2d8ec4f4d6faba84485995c18
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Sun Nov 20 14:51:49 2016 +0530
loleaflet: Do not grey out for disabled context menus
Change-Id: Id3bf5db6054e5df9511c491452ef164faa3289f9
diff --git a/loleaflet/dist/spreadsheet.css b/loleaflet/dist/spreadsheet.css
index 4b388a1..b53ba61 100644
--- a/loleaflet/dist/spreadsheet.css
+++ b/loleaflet/dist/spreadsheet.css
@@ -54,10 +54,6 @@
border-top: 0px;
}
-.spreadsheet-tab.context-menu-disabled {
- color: grey;
- }
-
.spreadsheet-header-corner {
border: 1px solid darkgrey;
background-color: lightgrey;
commit 7312aaced7412d3bf5d6a938938ce15a261cdb09
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Sun Nov 20 14:50:23 2016 +0530
loleaflet: More sane names
Change-Id: Idc47e84cd1242e61c98b9caa5eed28dd3d1912e4
diff --git a/loleaflet/dist/spreadsheet.css b/loleaflet/dist/spreadsheet.css
index cec23ad..4b388a1 100644
--- a/loleaflet/dist/spreadsheet.css
+++ b/loleaflet/dist/spreadsheet.css
@@ -29,7 +29,7 @@
margin-left: 6px;
}
-.spreadsheet-context-menu {
+.spreadsheet-tab {
margin: 0px;
margin-top: 2px;
margin-right: 3px;
@@ -45,7 +45,7 @@
color: black;
}
-.spreadsheet-context-menu-selected {
+.spreadsheet-tab-selected {
background: white !important;
color: black !important;
margin-top: 0px;
@@ -54,7 +54,7 @@
border-top: 0px;
}
-.spreadsheet-context-menu.context-menu-disabled {
+.spreadsheet-tab.context-menu-disabled {
color: grey;
}
diff --git a/loleaflet/src/control/Control.Tabs.js b/loleaflet/src/control/Control.Tabs.js
index 3510fc7..296729d 100644
--- a/loleaflet/src/control/Control.Tabs.js
+++ b/loleaflet/src/control/Control.Tabs.js
@@ -18,7 +18,7 @@ L.Control.Tabs = L.Control.extend({
this._initialize();
}
setTimeout(function() {
- $('.spreadsheet-context-menu').contextMenu(e.perm === 'edit');
+ $('.spreadsheet-tab').contextMenu(e.perm === 'edit');
}, 1000);
},
@@ -30,7 +30,7 @@ L.Control.Tabs = L.Control.extend({
this._tabsCont = L.DomUtil.create('div', 'spreadsheet-tabs-container', docContainer.parentElement);
$.contextMenu({
- selector: '.spreadsheet-context-menu',
+ selector: '.spreadsheet-tab',
className: 'loleaflet-font',
callback: function(key, options) {
var nPos = parseInt(options.$trigger.attr('id').split('spreadsheet-tab')[1]);
@@ -104,7 +104,7 @@ L.Control.Tabs = L.Control.extend({
for (var i = 0; i < parts; i++) {
var id = 'spreadsheet-tab' + i;
- var tab = L.DomUtil.create('div', 'spreadsheet-context-menu', ssTabScroll);
+ var tab = L.DomUtil.create('div', 'spreadsheet-tab', ssTabScroll);
tab.innerHTML = e.partNames[i];
tab.id = id;
@@ -118,9 +118,9 @@ L.Control.Tabs = L.Control.extend({
}
for (var key in this._spreadsheetTabs) {
var part = parseInt(key.match(/\d+/g)[0]);
- L.DomUtil.removeClass(this._spreadsheetTabs[key], 'spreadsheet-context-menu-selected');
+ L.DomUtil.removeClass(this._spreadsheetTabs[key], 'spreadsheet-tab-selected');
if (part === selectedPart) {
- L.DomUtil.addClass(this._spreadsheetTabs[key], 'spreadsheet-context-menu-selected');
+ L.DomUtil.addClass(this._spreadsheetTabs[key], 'spreadsheet-tab-selected');
}
if (map._permission === 'edit') {
commit 61af82792fde93ad9ada21779b24765c06f1d534
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Sun Nov 20 14:41:32 2016 +0530
loleaflet: Rename to spreadsheet-tabs-container
Change-Id: I08d57e55e4963beefb2aa3d26b05da75a5fd0ba6
diff --git a/loleaflet/dist/spreadsheet.css b/loleaflet/dist/spreadsheet.css
index 19147d7..cec23ad 100644
--- a/loleaflet/dist/spreadsheet.css
+++ b/loleaflet/dist/spreadsheet.css
@@ -5,7 +5,7 @@
bottom: 65px !important;
}
-.spreadsheet-tab {
+.spreadsheet-tabs-container {
margin: 0;
padding: 0;
left: 132px;
diff --git a/loleaflet/src/control/Control.Tabs.js b/loleaflet/src/control/Control.Tabs.js
index 3365f29..3510fc7 100644
--- a/loleaflet/src/control/Control.Tabs.js
+++ b/loleaflet/src/control/Control.Tabs.js
@@ -27,8 +27,7 @@ L.Control.Tabs = L.Control.extend({
this._tabsInitialized = false;
this._spreadsheetTabs = {};
var docContainer = map.options.documentContainer;
- this._tabsCont = L.DomUtil.create('div', 'spreadsheet-tab', docContainer.parentElement);
- this._tabsCont.id = 'spreadsheet-tab';
+ this._tabsCont = L.DomUtil.create('div', 'spreadsheet-tabs-container', docContainer.parentElement);
$.contextMenu({
selector: '.spreadsheet-context-menu',
More information about the Libreoffice-commits
mailing list