Commit graph

341 commits

Author SHA1 Message Date
Andras Timar
c3fe386dc0 loleaflet: enable l10n of Color picker widget 2016-06-03 12:25:54 +02:00
Pranav Kant
26d5614b89 loleaflet: bccu#1777: bccu#1555: formula bar fixes
* Use new param DontCommit in .uno:EnterString to not trigger
recalculation until enter is pressed.
* On pressing 'ESC', reset the current content
* Range selection is now possible when formula is entered in
* formula bar
* Forward 'enter' key events to `map` from formula bar

Change-Id: I073eca2fa08520faa9f679b1c986e10805da0ad6
2016-06-01 21:24:46 +05:30
Andras Timar
4b72613447 loleaflet: bccu#1649 l10n of Admin Console 2016-05-31 23:31:16 +02:00
Andras Timar
fdc109d002 loleaflet: l10n of loading.html 2016-05-31 16:57:20 +02:00
Andras Timar
2e035ee2cc loleaflet: fix wrong uno command name for opening hyperlink 2016-05-31 14:50:39 +02:00
Pranav Kant
7e1d3fe87e loleaflet: Consistency
Change-Id: I5962af5731199cf507da0eece0adc7b480f48ce0
2016-05-31 14:33:31 +05:30
Pranav Kant
d9019a2e79 loleaflet: Reuse html canvas spinner for slideshows
Move the spinner initialization to a separate class L.LOUtil.
Other similar LO related functions should also go there.

Also remove superfluous class leaflet-slideshow-spinner. It was
not being used anyway due to wrong spelling.

Change-Id: Ie8fac0391a9c6a3771900539e8f08d1b73b9be28
2016-05-31 14:30:22 +05:30
Andras Timar
1395d604dd loleaflet: bccu#1804 related: do not try to localize user defined style names 2016-05-30 00:13:19 +02:00
Henry Castro
2731e1fc02 loleaflet: bccu#1804 Style listbox does not get css styling 2016-05-29 17:19:51 -04:00
Pranav Kant
6831385c05 bccu#1850 - Help shadows all but menu bar
Change-Id: I156fde8e70421292e0bd134340eb01e1950853b7
2016-05-29 15:14:01 +05:30
Pranav Kant
3414ab2754 loleaflet: linting: fix errors in toolbar.js
Such a huge confusing diff is mainly due to moving of functions from bottom
to top because a function should be defined before it is used.

Other changes include using single quotes for strings, and other
minor style fixes.

Change-Id: Ieb8e5054a9c8113ec211973e086111d91759f80b
2016-05-29 14:58:38 +05:30
Andras Timar
9c1ff7ef96 loleaflet: decide UI language early 2016-05-29 00:04:35 +02:00
Andras Timar
eaf01b2f4c loleaflet: l10n of slide layouts 2016-05-28 18:48:13 +02:00
Andras Timar
62abb2533d loleaflet: bccu#1854 add optional 'lang' parameter to loleaflet.html 2016-05-28 11:04:57 +02:00
Henry Castro
ffd5f7eb5c loleaflet: rename style to layout combobox 2016-05-27 23:51:32 -04:00
Henry Castro
b1172c6b24 loleaflet: bccu#1799 Apply Styles does not work in Presentation 2016-05-26 21:39:12 -04:00
Jan Holesovsky
74c4e08a5f Minor visual tweak of the insert table (more space on the right). 2016-05-26 20:03:00 +02:00
Andras Timar
3db3c3c0fc Pull translations from Pootle 2016-05-26 19:15:09 +02:00
Andras Timar
da0e2e7463 loleaflet: move insert table button to 1st position of its section
The top left corner of dropdown table widget is near to the mouse
position where the user clicks. If Insert table button is too close
to egde of screen, it cannot be drawn properly.
2016-05-26 13:27:57 +02:00
Faruk Uzun
e6ea503885 loleaflet: bccu#1829: Fix some insert table button issues
- Use css for highlight cells.
- Close insert-table dialog on mouse leave.
- Better GUI
- More jQuery

Change-Id: I35e25f4ff150e373e70e7b14aa434d1dc055746a
2016-05-26 15:42:18 +05:30
Pranav Kant
cdd6147f56 loleaflet: Rework toolbar resize; fix an infinite loop
Set the min-width of window to 600px so that all select list
boxes remain in main toolbar, and not go in toolbar-more.

While resizing the toolbar, if the user tries to reduce the
window width past the min-width set, we would run into an
infinite loop causing spike in browser CPU usage and eventually
crash. This used to happen earlier also before setting this
min-width with very small browser window size.

Also simplify the toolbar resize algorithm. Rather than using raw
jquery methods to move items from one toolbar to another, use
library's (w2ui) methods to add/remove items from toolbar. This
also requires the need of proper initialization of few buttons
such as color picker, table picker because moving item from one
toolbar to another strips off the initialization corresponding to
these toolbar buttons and these need to be reinitialized. Moving
such initialization to onRefresh, hence, would keep them
initialized whenever toolbar is resized.

This also solves one major problem with enabled/disabled state of
toolbar buttons. Since, now, we are actually moving the items
from one toolbar to another, we can enable/disable them using
toolbar's methods ie. enable(), disable().

Change-Id: I64fb0a9d7761f66701bc0e020d1dbad9e4defe29
2016-05-26 14:31:01 +05:30
Pranav Kant
d915fc9310 loleaflet: Init font/back color on refresh
When these buttons are moved from toolbar-up to up-more and then
back they are not initialized.

Change-Id: Idc8c342092f723c3e50308988f8b2c070e0c08ad
2016-05-26 14:31:01 +05:30
Pranav Kant
d04a92fcf3 loleaflet: Check if clicked item is in toolbar-up-more
Change-Id: I8758f0195fcc9a2676597637c11efc9476d5093b
2016-05-26 14:31:01 +05:30
Pranav Kant
586b159902 loleaflet: Clean-up toolbar; fix en/dis-able button states
Use an object to keep track of enabled/disabled state of buttons.
This also prevents us looping all the format buttons everytime a
commandstatechanged is received, so better algorithmic
complexity.

For sessions in view-only mode, keep storing the state of these
buttons in this object, and use the stored states to
enable/disable buttons when edit lock is taken.

While enabling/disabling the toolbar buttons, also check in
toolbar-more.

Change-Id: I6555fde6669e1a8ba349c3213280a627a05d80b7
2016-05-26 14:31:01 +05:30
Henry Castro
4379d2fc3b loleaflet: bccu#1798 Choice of styles in listbox limited to a few in presentation 2016-05-25 19:34:46 -04:00
Andras Timar
7f55c00df0 loleaflet: added translations (ca,cy,de,el,es,fr,hu,is,nb,nn,pt-br,sv) 2016-05-25 23:23:02 +02:00
Andras Timar
fdaae06f8b loleaflet: use browser language codes
Reference: http://www.metamodpro.com/browser-language-codes
I did not remove codes, that are not listed, e.g. ca-valencia,
kmr-Latn etc. They may be added in the future to browsers.
2016-05-25 22:57:27 +02:00
Pranav Kant
92aed1fffd bccu#1825: Make 'Editing'/'Viewing' text also sensitive
Change-Id: Ice52dd5d7a459127df18307aad0b7d8f2ef5825e
2016-05-25 16:47:32 +05:30
Pranav Kant
f6ca0b08cb loleaflet: Replace gif spinner with html canvas
The gif spinner had a white background flashes in its frames, so
it always needed white background behind it. With this, we will
have no such restriction, can can have transparent background.

Change-Id: I1faffa326ae85114e52231cc4e33d84c7ac0675d
2016-05-25 14:58:48 +05:30
Jan Holesovsky
0545001add bccu#1833: Fix closing button in the help. 2016-05-24 14:27:04 +02:00
Pranav Kant
3c077539a2 loleaflet: When no permission specified, switch to old 'edit'
After the introduction of editlock, old styled loleaflet's view
and edit permissions have become obsolete. By default, when
opening a new document, the user is in that old styled 'view'
mode unless specified in the url by permission=

Lets change the behavior and make document to be in 'edit' mode
by default unless specified.

Change-Id: Iebf0d8512ddc8f7ff549c12dbb366643ca207345
2016-05-24 17:16:52 +05:30
Pranav Kant
a029377519 bccu#1824 - Move closedoc button in line with menubar
Change-Id: I711e4a724ea5b886469f6f69aa27bd53d84ccebf
2016-05-24 16:13:22 +05:30
Pranav Kant
f95dbb177d bccu#1832: Increase z-index of context menu overlay
... so that it could come *over* the menubar when space is
scarce.

Change-Id: I218ec359d37f42174c5b7035a2d6da9a11da2cd1
2016-05-24 12:45:22 +05:30
Andras Timar
8f35af5821 loleaflet: unify casing of tooltips of toolbar buttons 2016-05-24 08:09:19 +02:00
Pranav Kant
37b71b2289 loleaflet: Leave 125px from left for branding logo
Change-Id: I92dbf92e4d140c8975198b14f6560c1d309202a8
2016-05-24 11:32:54 +05:30
Andras Timar
63cbf9e4bb loleaflet: enable l10n of 'Document saved' message 2016-05-24 07:38:58 +02:00
Andras Timar
131ed8420d loleaflet: Set font of editlock popup message 2016-05-24 07:24:29 +02:00
Ashod Nakashian
96dd4821e1 loleaflet: bccu#1827 Cursor does not blink in CS Writer under IE11
The animation name shouldn't be in quotes.

Change-Id: Ib2e4489e482dd1a22472588599df87cab55a6005
(cherry picked from commit 401e3b12778cc5c7883322e4543370acf270c479)
Reviewed-on: https://gerrit.libreoffice.org/25392
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-24 03:32:07 +00:00
Andras Timar
ec6e626952 loleaflet: define l10n _() function earlier 2016-05-24 00:17:44 +02:00
Andras Timar
58c65fbca4 loleaflet: add dist/errormessages.js 2016-05-23 23:53:32 +02:00
Andras Timar
c90bd39b2e loleaflet: remove obsoleted dialog for menu:file:saveas 2016-05-23 22:40:30 +02:00
Andras Timar
55c77c6deb loleaflet: enable l10n of two error messages 2016-05-23 22:32:56 +02:00
Andras Timar
b946b3b8c2 Ctrl + Down Arrow in fact jumps to the beginning of next paragraph 2016-05-23 15:23:32 +02:00
Christian Lohmaier
2bc0f09a22 typo: horizontaly → horizontally 2016-05-23 15:12:00 +02:00
Andras Timar
5271a91069 loleaflet: add l10n support to VIEVING/EDITING labels 2016-05-23 13:25:26 +02:00
Andras Timar
9fc6c56335 loleaflet: bccu#1818 position formula toolbar to left 2016-05-23 13:16:28 +02:00
Andras Timar
d173a21b28 loleaflet: hide 'Insert Table' for spreadsheets, get it right finally 2016-05-23 12:48:38 +02:00
Andras Timar
c3b55e40fa loleaflet: hide 'Insert Table' for spreadsheets, disable 'Insert Table' in view mode 2016-05-23 11:51:59 +02:00
Andras Timar
cb24e246cc loleaflet: hide 'Insert Table' for spreadsheets, disable 'Insert Table' in view mode 2016-05-23 11:30:14 +02:00
Andras Timar
7126135146 loleaflet: Enable l10n for 'take edit' note 2016-05-23 11:27:15 +02:00
Andras Timar
c091cd20eb loleaflet: Set font for table picker 2016-05-23 11:09:33 +02:00
Andras Timar
491a41933d loleaflet: Set font for zoom percentage 2016-05-23 10:59:04 +02:00
Andras Timar
624823f721 loleaflet: Set font for Search label and enable l10n 2016-05-23 10:42:10 +02:00
Pranav Kant
ffd230e1f9 loleaflet: Use same font-family wherever possible
"Segoe UI", Tahoma, Arial, Helvetica, sans-serif; 12px

Change-Id: I8927c31ca4641eaa3181e4f76bac2e112893fcd8
2016-05-23 13:41:38 +05:30
Pranav Kant
3d266a4d60 loleaflet: More consistent styling to match LO desktop
Selection background color is now consistent across context menu
and menubars.

Don't change the cursor to 'pointer' in context menus on hover.

Change-Id: I25d1fcba113f2c27a8ab6d028244afd75c28cd59
2016-05-23 13:41:38 +05:30
Pranav Kant
461d88e38d loleaflet: Fix errors in new draggable table grid toolbar button
Change-Id: Ic5c1ecbe0753017ad4b4c57ef74ae28d724c00a4
2016-05-23 13:41:38 +05:30
Faruk Uzun
5846748e2a loleaflet: add draggable table grid button to toolbar
You can insert tables to text documents and
it is working same as the desktop version.

Change-Id: I5d516e31c8b7453ca7f8306df3b9c17764e94098
2016-05-23 13:41:38 +05:30
Pranav Kant
acfb9922d5 loleaflet: menubar: Decrease separator height
Change-Id: I3c96bbc227ba911861e5d13902ad4f8dbb414549
2016-05-23 13:41:38 +05:30
Pranav Kant
17b3748a52 loleaflet: Dont change cursor on disabled items
Change-Id: If709e58a426be3d0f0bdbf52ae81a04c87790518
2016-05-23 13:41:38 +05:30
Pranav Kant
887f6314ab loleaflet: Prevent user from selecting menubar items
... and don't change the cursor while hovering over items

Change-Id: I221048451fdda2ac66c1f2e500732836ed66fe03
2016-05-23 13:41:38 +05:30
Pranav Kant
6b773910d3 loleaflet: Don't move text when highlighted
Change-Id: I69602c4b1b4256733506983d53d289627771f291
2016-05-23 13:41:38 +05:30
Pranav Kant
93ef7aae3f loleaflet: Align toolbar to the left
Change-Id: I07650734b3c4a771d8fc3b9f0d968dc5df700045
2016-05-23 13:41:38 +05:30
Pranav Kant
a662755658 loleaflet: More styling; merge white backgrounds
Merge highlighted white background of top-level menuitems with
white background of dropdown.

Change-Id: Id6671a923420b5bc0be96597f7777872df6d8332
2016-05-23 13:41:38 +05:30
Pranav Kant
7f8d7bf07e loleaflet: Style changes
* Center the label on top-level menubar items
* Remove padding off the top of menubar
* Little more padding-top to menubar

Change-Id: I70adc72bb93d7388f59f670ad76b1b4ac6741f68
2016-05-23 13:41:38 +05:30
Pranav Kant
da69451afe loleaflet: Kill old filemenu as we have whole menubar now
Change-Id: Idec0f41fa5ce94cf152535772d9c7ea822f1ac1e
2016-05-23 13:41:38 +05:30
Pranav Kant
cc7b2b00cf loleaflet: menubar: Make menuitems in writer functional
1. Prune out all other items that are not possible now.
2. Add a seperator CSS class and use it between menuitems.

... and other minor functional/UI changes.

Change-Id: I037e2b6f751824c973072c52905d46b0fd4be38b
2016-05-23 13:41:38 +05:30
Pranav Kant
2d18ec899d loleaflet: We do not want to switch to mobile mode anyhow
If we do, uncommenting the appropriate code pieces would make it
work again.

Change-Id: Ib4729033b2cf6c3bcafc6ac59f09f42bf02e34ca
2016-05-23 13:41:38 +05:30
Pranav Kant
9c1a2a9dd3 loleaflet: And we have a menubar now
... with some CSS tweaks in sm-simple.css to make it look more
like LO menubar in desktop application.

Change-Id: I62c88d5876da752fb487e89a3613698c463d9f32
2016-05-23 13:41:34 +05:30
Pranav Kant
2c3964be1d loleaflet: Setup infrastructure for top menubar
Change-Id: Ib48c2b3219b74da15bc2898044ad9b3c01f8a203
2016-05-23 13:27:48 +05:30
Pranav Kant
36d5191b4d loleaflet: Add jquery smartmenus plugin
License: MIT

Additionally, the sm-simple.css file is indented appropriately as
we would need to modify it to our needs later.

Change-Id: Iab909d2e06af342b22ebeffc86b3efdc1bacb73e
2016-05-23 13:27:48 +05:30
Pranav Kant
c641a2da8c loleaflet: Shift everything 25px down for filemenu toolbar
Change-Id: Ibf03dd066ea5c97a054dbda575daa3cb5d5f708c
2016-05-23 13:27:44 +05:30
Andras Timar
cebc99c52d loleaflet: uno commands l10n, forgot to add this 2016-05-20 21:47:05 +02:00
Andras Timar
bd6ee3a8b6 loleaflet: initial l10n support of context menus 2016-05-20 18:13:44 +02:00
Jan Holesovsky
6f868ed74d loleaflet: Pack the toolbars a bit to take less space. 2016-05-19 10:13:46 +02:00
Jan Holesovsky
3b6cdcb790 loleaflet: Don't check the 'Take edit' button, only enable/disable. 2016-05-19 08:48:40 +02:00
Jan Holesovsky
58e7bfd971 loleaflet: Adjust various css values to the large icons. 2016-05-19 00:50:17 +02:00
Jan Holesovsky
4d539a5cd3 loleaflet: Switch to using large icons.
Kept the small icons around for the case we'd like to implement switching
between these two (?) - OTOH not sure it makes sense, as the toolbars will not
get smaller by just using the smaller icons...  But always can remove them in
a separate commit.
2016-05-19 00:43:51 +02:00
Jan Holesovsky
b5eee85e20 loleaflet: Rename the icons to what is directly in LibreOffice.
So that it is easier to update to new version etc.
2016-05-19 00:43:51 +02:00
Jan Holesovsky
1e57be7094 Fix some broken icons, remove the unused ones. 2016-05-19 00:43:51 +02:00
Jan Holesovsky
30f34cff39 document_simple_example: Kill Control.Presentation.js. 2016-05-19 00:43:50 +02:00
Jan Holesovsky
0f3cf72724 document_simple_example: Kill Control.Buttons.js.
We don't need the document_simple_example.html any more, remove the stuff that
is needed only for that.
2016-05-19 00:43:50 +02:00
Pranav Kant
58c1714ee8 loleaflet: Setup context menu
But use a whitelist to not show items/uno commands that
correspond to opening a dialog. Whitelist is limited as of now,
but can be extended easily to include more commands to the
context menu as required.

Change-Id: I3ff8cf722d395aa643d512c98db41ebeee0a95d1
2016-05-16 14:37:51 +05:30
Pranav Kant
37145f9969 loleaflet: command was an undefined variable
... which leads to a JS error making font size list box not
workable sometimes.

Change-Id: I7452960c05a655ebdf48e3170987c29a37a7c2a6
2016-05-13 17:07:40 +05:30
Pranav Kant
1a918d8781 loleaflet: Fix incorrect variable access
Change-Id: I11981c002808257d39aea70a632039a40839397b
2016-05-13 16:42:39 +05:30
Pranav Kant
cf932d52ec bccu#1788: Center/Align the color feedback under the icon
Change-Id: I985f502e4810ff76d99f4375bd85d6819e64e325
2016-05-13 00:35:01 +05:30
Pranav Kant
fc87000a62 loleaflet: More checking; don't add element if already added
Change-Id: Id0e71b5f100167e39d95cbad6033a42f1111b570
2016-05-13 00:34:07 +05:30
Pranav Kant
870b46be78 bccu#1756: Check for empty input
In case of presentation we are getting an empty value in response
to .uno:CharFontName. While this looks like a bug in LOKit, no harm
in putting a check for empty values here.

In ES5 argument to Object.keys must be an object otherwise it
throws an exception.

Change-Id: I5c2f7963544fda55bab3f314f1b098b3c9e3bd0b
2016-05-13 00:00:49 +05:30
Andras Timar
a4cd9aeebe loleaflet: help text: Calc Select All with Ctrl + A 2016-05-12 11:11:32 +02:00
Jan Holesovsky
ed65c018ef "Comment" -> "Insert Comment" in the toolbar. 2016-05-12 09:35:21 +02:00
Feyza Yavuz
20a8652041 loleaflet: Added Comment button to toolbar
Change-Id: Ic79f942babc36f061065b2ef73be204b544f096e
Reviewed-on: https://gerrit.libreoffice.org/24696
Reviewed-by: pranavk <pranavk@collabora.com>
Tested-by: pranavk <pranavk@collabora.com>
2016-05-11 13:32:40 +00:00
Pranav Kant
b50b159aed loleaflet: Use Standard styles if Default is missing
'Standard', and 'Default' styles seem to containing same values
anyways. If we do not have 'Default', use 'Standard' ones.

Change-Id: I4402f78fb54c77a7cf6d9868210cb97a9e2c4580
2016-05-10 16:16:01 +05:30
Pranav Kant
6fb9a5becf bccu#1756: Style the presentation list box
Upon creating an .odp file from owncloud, 'Default' styles are
not created which leads to a js error as variable styles go
undefined later in the script.

Change-Id: I30caf980bd924e6329559b36b1f0a5fbe60ecc4b
2016-05-10 16:16:01 +05:30
Lenny Horstink
6d18572c62 Visual improvements to spinner
Change-Id: I54f945867efe5e56c2e6696b905a97f04b832f90
2016-05-10 16:16:01 +05:30
Pranav Kant
d08b549adc loleaflet: Package jquery(ui) files
And use these directly from debug/document/loleaflet.html instead
of CDN. Helpful for development when no internet connection.

License: MIT

Change-Id: I4d2086ffc9e9e646164c70481ae74e6c1f7a7062
2016-05-09 11:29:29 +05:30
Ashod Nakashian
3cefa3c6e4 loleaflet: announce the current part after taking editing
Make sure to sync both lokit and viewers as to which
part is being edited when a previously-viewer takes
editing.

Change-Id: Ia70f647a26029447bb4360633f79233fa9596059
Reviewed-on: https://gerrit.libreoffice.org/24768
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 15:50:27 +00:00
Pranav Kant
1864491e23 loleaflet: Enable/Disable buttons for edit/view modes, ccu#1768
Change-Id: Id14ef66adb9bda33246625d89c093cb88927f2bb
2016-05-06 13:59:21 +05:30
Pranav Kant
2d69745d2c loleaflet: Use tabs consistently
Change-Id: I1d24ba1c8956a919eb02347dfc379927f536173e
2016-05-06 13:06:26 +05:30
Pranav Kant
3d02fb7497 loleaflet: Enable/disable spreadsheet tabs for edit/view mode
Change-Id: I084f676e77fc161c109a5271dd1cad60a3e5474f
2016-05-05 14:30:00 +05:30
Pranav Kant
caa3ea2348 loleaflet: Don't enable/disable toolbar items based on permission
For the time being, till we have the editlock, only
enable/disable toolbar items based on it.

Change-Id: I71b5be33e2ec706def198471274df60a22d7ee65
2016-05-04 16:50:06 +05:30
Pranav Kant
2952cae32b loleaflet: Fix presentation-toolbar
Without padding:0; it would appear with a height of 4px just
above the statusbar.

Change-Id: I4b3058eab656739c26a4ceb02f239c63e27f0e47
2016-05-02 18:28:15 +05:30
Pranav Kant
787bdc276f bccu#1758: Move presentation control below slide sorter
Change-Id: I0f1046f55f4bdc8af209138a51e74e1b637a5a34
2016-04-29 21:51:08 +05:30
Pranav Kant
edd248e25c loleaflet: Fix indentation
Change-Id: I4996f235d20976e969ae48874d0a6c98ee212c43
2016-04-29 21:51:08 +05:30
Pranav Kant
551352e379 bccu#1583: Make scrollbar visible for Impress docs
We use 180x180 px as thumbnail size, and 2px border for selected
thumbnail on top of that which makes its 184x180.
.parts-preview needs to be expanded to 214px for
mCustomScrollbar to work properly without hiding any thumbnails
including borders. With all of this, we also need to shift
impress document offset to 214px from left to make all things fit
nicely.

Change-Id: I446918403cd43fe61f0ebfb358e6a2051014b28a
2016-04-29 13:09:10 +05:30
Pranav Kant
742a8da434 bccu#1749: Fix flashing of spreadsheet-toolbar during doc load
Hide the spreadsheet-toolbar by default, and only show when we
are confirmed that its a spreadsheet, instead of doing
vice-versa.

Change-Id: Iddaca0fb272dbe8dd8b6e73157eb4733762d8a8a
2016-04-29 13:09:10 +05:30
Pranav Kant
cc0814df04 loleaflet: Prevent intermixing of multiple timeouts
Clear a timeout before setting it.

Change-Id: Ic808962b880a4c18b24e2f603dc1d351d65419ed
2016-04-27 14:02:37 +05:30
Pranav Kant
f26900399d bccu#1745: Fix Calc blinking due to popup message
Use w2overlay instead of w2popup. The former adjusts itself in
the visible screen region and fixes, and does not introduce any
additional scrollbars for the lifetime of the popup message.

The w2overlay gets removed with mouse events. So instead of
'mousedown' events originally, use 'mouseup', so that there is no
succeeding mouse events to switch the overlay off.

Also point the overlay pointer towards the button, not the label.

Change-Id: Ic6c22fecc2e32075c27b6f4647373c28d2f635ae
2016-04-27 13:50:39 +05:30
Jan Holesovsky
2c5c0d056b loleaflet: Many visual improvements in the spreadsheet.
Sheet buttons better aligned, no overlaps in sheet scrolling buttons, more
consistent colors, no remnants of scrollbars, etc.
2016-04-25 19:05:01 +02:00
Pranav Kant
b825cd391f bccu#1693: Empty item is not an object
Treating empty item as an object expects `id` attribute on which
toString method would be invoked. In case of object without `id`, it
would throw an error trying to call toString on undefined
attribute.

Change-Id: I44e591044487b0d236760cc79438ccfcf0f53846
2016-04-25 12:59:43 +05:30
Pranav Kant
616cb5f451 bccu#1689: Show a popup when non-editlock view tries to edit
Show a popup on 'mousedown' and 'keypress' events for
non-editlock modes.

Change-Id: I3a8a964d6a507549f521f3f831a4c623d202c86c
2016-04-20 16:50:36 +05:30
Pranav Kant
14b672bf5f bccu#1707: Do not mix editlock with permissions
For some reason, text cursor gets stuck making it impossible to
type in the document. This only happens with firefox + owncloud.

Lets keep the editlock state separately in map, and do not yet
mix the permissions with editlock state.

Change-Id: If4193d08b7228cde510321ec5b4c892b8617d8a7
2016-04-20 16:50:36 +05:30
Jan Holesovsky
97342a2817 bccu#1653: Make the .html's, .css's and .js's versioned.
It is still possible to access them directly via loleaflet/dist/<something>,
but such use can lead to unexpected behaviour due to various caching in the
browsers etc.
2016-04-20 12:58:10 +02:00
Pranav Kant
da7dd6f634 loleaflet: Remove bunch of warnings from the console
It is incorrect to add the <div> elements with parent as w2ui
toolbar outside of onRefresh() method because toolbar can
refresh multiple times during its lifetime meaning that all such
added elements will be removed after first refresh breaking the
font/back color feedback javascript code.

Hence, this also fixes the font/back color feedback.

Change-Id: Iacd4f8a5c8ebb64e5bba5e7f05ceef8b77051534
2016-04-19 22:13:36 +05:30
Jan Holesovsky
aa158331fc Move css stuff from loleaflet.htms to the appropriate .css files. 2016-04-19 10:23:06 +02:00
Pranav Kant
0597a1873d loleaflet: Disable toolbar buttons without editlock
Change-Id: I18b067e99ff04073a4065536534fdb0db00285dd
2016-04-14 21:04:56 +05:30
Pranav Kant
95b9674022 loleaflet: Remove leftover code for enable editing/selection
Buttons are removed in e228817a8c

Change-Id: I3a4994d8e3c34ac49c466434d62264e86e11c3a1
2016-04-14 15:08:01 +05:30
Jan Holesovsky
b09b6eab89 Only the access_token (and _ttl) is supposed to be passed via the form post. 2016-04-13 18:32:00 +02:00
Andras Timar
07b68b37a9 loleaflet: put everything we use to dist/ and package only dist/ 2016-04-13 16:55:46 +02:00
Pranav Kant
8f9d812806 loleaflet: We do not use underscores in identifier names
Change-Id: Ic466bb3067353c9d271ea264a323502a03ed2c2b
2016-04-13 11:47:22 +05:30
Pranav Kant
df0315f317 loleaflet: Change message on status bar when document is saved
... and empty the status bar when document is modified and not
yet saved on server.

Change-Id: I976405783f744b875b9f6ee7e700006bddf5bc6f
2016-04-13 11:45:56 +05:30
Jan Holesovsky
b76140cb7b loleaflet: Trigger locontextmenu event with the context menu structure. 2016-04-08 19:15:08 +02:00
Andras Timar
3f0d5a7521 loleaflet: allow HTTP-only mode for testing/trial 2016-04-08 13:16:49 +02:00
Henry Castro
b6aeee816c loleaflet: restore default example title 2016-04-07 17:35:00 -04:00
Henry Castro
dd96c6a4de loolwsd: handle a POST request in loleaflet 2016-04-07 17:20:45 -04:00
Henry Castro
a06974e2b3 loleaflet: add loading spinner to slide show 2016-04-06 15:54:55 -04:00
Henry Castro
ab0429622e loleflet: rework progress bar 2016-04-06 09:14:54 -04:00
Jan Holesovsky
fa4ea0200b loleaflet: Show the 'More' button only when there are more items. 2016-04-06 09:00:48 +02:00
Pranav Kant
7da31f6fa3 bccu#1660: Remove unused/superfluous links
Change-Id: Ib5e78586a1c33ca16bd4848e0912313434b7db54
2016-04-06 10:15:49 +05:30
Jan Holesovsky
560dc6c6ab loleaflet: It is not necessary to inform about EDITING, that's the default. 2016-04-05 17:55:05 +02:00
Jan Holesovsky
e228817a8c bccu#1658: 'Enable editing' and 'Enable selection' buttons are not necessary.
Also some other small tweaks, like disable the Previous / Next part buttons in
spreadsheet, and better naming of them.
2016-04-05 17:22:44 +02:00
Pranav Kant
2220c9d0d0 loleaflet: Rename filename -> title
Change-Id: Ic65b8e819979e35d684807371c76abca55bd5928
Reviewed-on: https://gerrit.libreoffice.org/23734
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-04-01 17:22:16 +00:00
Pranav Kant
fcc48022fa Allow leaflet to be served from loolwsd
Change-Id: I0179f07d83e9d640ab82ad2a866ef493fdf9e655
Reviewed-on: https://gerrit.libreoffice.org/23721
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-04-01 13:31:53 +00:00
Pranav Kant
28cf20b091 bccu#1640: Add elapsed time field to admin console
Time increment is handled on client-side, server only sends the
elapsed time during first page-load.

Change-Id: I73e98fd95ca9f391b625a8dcfc7e3490878c6a40
2016-04-01 13:33:45 +05:30
Henry Castro
a1e3c30d6e loleaflet: bccu#1622, add a marker progress bar 2016-03-31 21:33:48 -04:00
Pranav Kant
b81abc4079 loleaflet: Edit lock implemention on front-end
Change-Id: I97c2b2e0a4ef51c6335cefe3e9ec8f5904deb9f4
2016-03-31 19:24:17 +05:30
Jan Holesovsky
9b54337568 loleaflet: Warn when somebody tries to use ws: for the websocket. 2016-03-29 14:47:09 +02:00
Pranav Kant
18e1f2f8e7 loleaflet: Do not track built admin-src.js
Also delete the admin-src from there. It is not supposed to be
under git. This is generated during make from all the files in
src/admin

Change-Id: Ib1c8b637c40bf7bec7924a9582262f50fb093e47
2016-03-25 18:24:11 +05:30
Pranav Kant
c013b40735 loleaflet: Fix 'Outline' styles in impress
Change-Id: I1815dcfae7d7b0c107357d13a6dbe70a7d9ef4bc
2016-03-25 18:24:11 +05:30
Pranav Kant
32e24dcab3 loleaflet: Make style l10n work in new toolbar
Please note that this is just a workaround because there is no
consistent pattern between LO sending us programmatic, UI names.
During the initial command value event, we get programmatic names
from it. During the state change event, we get UI names for
Writer, but programmatic ones for others.

Change-Id: I7e69e1d437b22a34e54d2026b76e81951c4cc601
2016-03-25 18:24:11 +05:30
Andras Timar
abe330d390 loleaflet: ws:// -> wss:// 2016-03-23 22:02:50 +01:00
Pranav Kant
7f371958ae SSL everywhere
Use same port (9989) for all client connections. This includes
admin panel, static file serving and normal client websocket
connections.

Change-Id: Idcfd7dd8925523c36e884717c41a3b6a827f6ff3
2016-03-22 00:05:29 +05:30
Pranav Kant
ee5ebb8489 loleaflet: Move admin console related files to dist/admin
Better to put all admin related content in a separate directory
rather than mixing it with other files in dist/

Change-Id: I328ff95cf23251ff91bb438c3b9be923ccc2017f
2016-03-22 00:05:29 +05:30
Tor Lillqvist
e41be7c0f4 Revert "loleaflet: Move admin console related files to dist/admin"
This reverts commit 3a09c992f7.
2016-03-21 16:52:52 +02:00
Pranav Kant
3a09c992f7 loleaflet: Move admin console related files to dist/admin
Better to put all admin related content in a separate directory
rather than mixing it with other files in dist/

Change-Id: I328ff95cf23251ff91bb438c3b9be923ccc2017f
2016-03-21 16:33:17 +02:00
Pranav Kant
b881e986d8 loleaflet: Column and row headers are selectable now
... with multi-select shift and ctrl key behavior like desktop
calc version.

Change-Id: I574037f984ee1844773b0fb8c90c5bb1c079188b
2016-03-18 12:09:15 +01:00
Pranav Kant
d9085eb0d0 loleaflet: Don't use l10n framework for style mappings
Change-Id: I25c738b885f145e69a3516530c77d92a614f7053
2016-03-17 12:34:26 +05:30
Henry Castro
dc129d00cc loleaflet: add WOPISrc parameter 2016-03-16 08:58:07 -04:00
Ashod Nakashian
83880c454f loleaflet: removed unnecessary token parameter sent to WSD
Change-Id: Ibdef21665fcbf65c95870c8711321f63f7098596
Reviewed-on: https://gerrit.libreoffice.org/23050
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-09 02:32:19 +00:00
Pranav Kant
5cc204ba71 loleaflet: Add support to kill children
Additionally, move jquery <script> tags up because we need jquery
to add context menu to table rows as soon as page is opened
(socket is opened, in this case).

Change-Id: Ic6e28486fb96f119e7d41168fc0039265f15a087
2016-03-08 15:12:12 +05:30
Pranav Kant
7fd206e61e loleaflet: Add jquery to assets/
If CDN doesn't respond, load jquery from dist/

Change-Id: I8073735996d574f652b757d899c191bcefe03a7c
2016-03-08 15:12:06 +05:30
Pranav Kant
943d9a517e loleaflet: Add total memory, active users, active/open docs
Change-Id: Ie92ca10d9fb892daf45c17edd58b464c9f7cc09b
Reviewed-on: https://gerrit.libreoffice.org/22990
Reviewed-by: pranavk <pranavk@collabora.com>
Tested-by: pranavk <pranavk@collabora.com>
2016-03-08 09:40:58 +00:00