Commit graph

1231 commits

Author SHA1 Message Date
Andras Timar
a5d79702a7 loleaflet: bccu#1862 remove Table -> Delete -> Table from impress menu
Apparently it does not work. In desktop version I cannot delete a table by
Select All + Cut, or Select All + Delete/Backspace key. Only Select All +
Delete Rows/Columns works...
2016-05-31 11:22:20 +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
Henry Castro
0fe4c89e55 loleaflet: adjust partName and partHash 2016-05-30 20:23:54 -04:00
Pranav Kant
08636e6c67 bccu#1768: loleaflet: Disable row/col headers menu while viewing
Change-Id: I89e0853b2a5e59ecf3e33c785991c5589d9c0864
2016-05-30 16:52:43 +05:30
Andras Timar
a4c8ceb1ac loleaflet: bccu#1856 disable View - Full screen on Edge, too 2016-05-30 00:43:04 +02:00
Andras Timar
6b57831673 loleaflet: fix js lint error 2016-05-30 00:29:47 +02:00
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
Andras Timar
c0098e5edd loleaflet: bccu#1836 disable View - Full screen menu item in IE11 2016-05-29 22:11:12 +02:00
Andras Timar
055ab8d317 loleaflet: typo dcoument->document 2016-05-29 18:25:11 +02:00
Pranav Kant
3516f31031 bccu#1841 - Remove selection uno commands from impress menubar
... temporarily, till we have them.

Change-Id: I5f35e54a33a7a1c96359de59e326a286af655ddf
2016-05-29 15:16:12 +05:30
Pranav Kant
6831385c05 bccu#1850 - Help shadows all but menu bar
Change-Id: I156fde8e70421292e0bd134340eb01e1950853b7
2016-05-29 15:14:01 +05:30
Pranav Kant
eaf3461873 loleaflet: fix indent errors reported by bumped eslint
Change-Id: I49e274e1d4869d9d0a39342d9c3b64747a1fc870
2016-05-29 14:59:52 +05:30
Pranav Kant
6e45f4fbfb loleaflet: Bump eslint version to 2.8.0
Adjust config file, .eslintrc, accordingly; remove deprecated
options

Change-Id: I113606c5d1fdc4c46216b1fa340c957fd0e69308
2016-05-29 14:59:52 +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
Pranav Kant
a7d3a8e9c3 loleaflet: Enable toolbar linting
Till now we have only been linting our src/ directory. toolbar.js
is the only file we edit directly in dist/. Lets keep a check on
it too.

Change-Id: I3e8a6e675a1d0c508339db1363600b5fe8f9c2cd
2016-05-29 14:36:25 +05:30
Pranav Kant
7460884df4 loleaflet: Remove superfluous entries
All files in dist/ are ignored already by our linting tool.
There's no point in list them here.

Change-Id: I0a3a67796d85506196eb13be347b1ff59bcae02f
2016-05-29 14:36:25 +05:30
Andras Timar
9c1ff7ef96 loleaflet: decide UI language early 2016-05-29 00:04:35 +02:00
Andras Timar
c508bff8df loleaflet: updated translations 2016-05-28 23:13:35 +02:00
Andras Timar
5e7d1166de loleaflet: slide layout English string change, in order to find translations 2016-05-28 20:19:01 +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
f8d36417d2 loleaflet: Regain focus after menubar selection
Change-Id: Ia0a5c81f5fe948a3552cfb36b82f9346f1b4969a
2016-05-25 17:20:50 +05:30
Pranav Kant
92aed1fffd bccu#1825: Make 'Editing'/'Viewing' text also sensitive
Change-Id: Ice52dd5d7a459127df18307aad0b7d8f2ef5825e
2016-05-25 16:47:32 +05:30
Pranav Kant
410cbf49f7 loleaflet: Sync debug/document/loleaflet.html with dist/loleaflet
Useful for debugging.

Change-Id: Ifeda2d061fcd8d98837da061c696e082a84c2850
2016-05-25 15:02:17 +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
Pranav Kant
83e625e6e6 bccu#1811: Give the stolen focus back to map
Fallback from d104e82d74

Change-Id: I5885bd11cee9499a26165e6989bb652683c4645d
2016-05-25 14:25:39 +05:30
Jan Holesovsky
0545001add bccu#1833: Fix closing button in the help. 2016-05-24 14:27:04 +02:00
Pranav Kant
d104e82d74 bccu#1811: Regain focus when inserting comment via context menu
Change-Id: Ic06d86f0ef991c04e9fe3c1be7119868fff4fdc3
2016-05-24 17:49:37 +05:30
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
fa8acdc857 loleaflet: enable l10n of context menu items which come from src files from LO 2016-05-24 08:53:07 +02:00
Andras Timar
ea20a29007 loleaflet: l10n of submenus of context menus 2016-05-24 08:22:37 +02:00
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
633598bf83 loleaflet: unify casing of menu items 2016-05-24 08:00:52 +02:00
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
3946ebd6e7 loleaflet: add font styling to row/column context menus 2016-05-24 00:29:13 +02: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
240ce7e8e9 loleaflet: don't ignore errormessages.js 2016-05-23 23:53:08 +02:00
Andras Timar
3724fc1b66 loleaflet: bccu#1813 workaround for double encoding in cp-5.0 branch 2016-05-23 23:31:37 +02:00
Andras Timar
62896c66ea loleaflet: enable l10n of menus 2016-05-23 22:49:11 +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
Pranav Kant
d2a7be0b6e loleaflet: Enforce linting during make
Change-Id: I509b13cb9f70c6de66b1906b76c4a968e05322f4
2016-05-23 20:08:29 +05:30
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
b5ce034fde loleaflet: update translations (test) 2016-05-23 13:32:01 +02:00
Andras Timar
1af287e437 loleaflet: add --from-code=UTF-8 to xgettext call 2016-05-23 13:29:16 +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
Pranav Kant
a2f9e2c255 loleaflet: Fix lint errors
Change-Id: Ib4447ebecf8e95cb1ac9432fcf8ca2f8b0859550
2016-05-23 14:24:26 +05:30
Andras Timar
624823f721 loleaflet: Set font for Search label and enable l10n 2016-05-23 10:42:10 +02:00
Pranav Kant
6104e3e4bf loleaflet: Disable menubar items for view only mode
Change-Id: Ic1a3c876df343598cf0b53f033ea9e35053e6a06
2016-05-23 13:41:38 +05:30
Pranav Kant
1e806b0a46 beforeFirstShow -> beforeShow
Change-Id: I8bdcc91220873c40d4161ade9a853233227476ab
2016-05-23 13:41:38 +05:30
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
8717b0417e loleaflet: Change 'Table' menubar structure to match LO
... useful for translation.

Change-Id: If3116351ea5b29c2cae866a7ac417c074ac35043
2016-05-23 13:41:38 +05:30
Pranav Kant
033ec74523 loleaflet: Disable menubar items according to context
Change-Id: I9c2918827eebfa033a3745a57299ba556015a2bb
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
2c0a1cb53f loleaflet: remove single item menus from writer
Change-Id: I477149793351fe225d94107bad7ce4c79678530e
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
7f453bc90a loleaflet: Functionality in menubar for presentation and spreadsheets
Change-Id: I5c235922dccdf2b6f28574a4791a6c93845f7fe7
2016-05-23 13:41:38 +05:30
Pranav Kant
71510a75f5 Kill common menu category
Change-Id: I17d6a704912fbdeb6238b838a250d4155a6ff40f
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
Andras Timar
7983031827 loleaflet: typo: seperator->separator 2016-05-20 11:06:41 +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
e3b0d00240 Kill the rest of document_simple_example.html + related controls.
[Those that are not used in the loleaflet.html.]
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
Henry Castro
5a455e0d0a loleaflet: fix slide show focus 2016-05-18 18:29:02 -04:00
Andras Timar
d4178e2988 loleaflet: typo: Resuls -> Results 2016-05-18 12:58:10 +02:00
Pranav Kant
a0b7a7eaf6 Revert "loleaflet: remove unnecessary duplicate message"
This message is required to update row/column headers when client
changes its part, otherwise we won't see new row/column headers
in new part.

This reverts commit d8f6aa7146.

Change-Id: Iabafdf27b45d174abd7bbd6ba79e7badc52b9985
2016-05-18 16:00:59 +05:30
Henry Castro
c511cc9fca loleaflet: fix "Maximum call stack size exceeded" 2016-05-17 12:27:56 -04:00
Pranav Kant
a703abb0a2 loleaflet: Handle some corner cases for context menu
Submenu doesn't have the UNO command always at least on cp-5.0.

Change-Id: Iba91d9f2751ddb2812272cd4008b8bb3e21009df
2016-05-16 18:29:47 +05:30
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
b2907626ba loleaflet: Add/delete row/column feature
Change-Id: I6dfd68029b5746d6c2907f4195f4647c63387c55
2016-05-13 16:21:44 +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
Pranav Kant
268eb615c2 loleaflet: Update scrollbar after resizing the container
Currently, it does get fired, it seems, and vertical scrollbar
does get adjusted automatically according to new size, but
horizontal scrollbar doesn't for some reason/bug. Lets explicitly
tell the plugin to update on every resize we do.

Change-Id: I706228302cb43fb22cf54acfe1b990d3e66d5281
2016-05-12 20:19:26 +05:30
Andras Timar
295163422e bccu#1712 Math.sign is not defined in IE 11 2016-05-12 13:29:28 +02:00
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
Ashod Nakashian
81e2e25ed8 loleaflet: disable fade animation which is distracting and buggy
Change-Id: I4170a9f58f4069cba9c88c85d520574a7fcb3885
Reviewed-on: https://gerrit.libreoffice.org/24907
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-12 01:55:58 +00: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
Andras Timar
d63d200a23 Bump version to 2.0.0 2016-05-11 09:55:17 +02:00
Ashod Nakashian
8d2a7ab162 loleaflet: translate the part correctly for text documents
Text documents have a single coordinate system, so they
only render in part 0. For others, each page/slide/tab
is a part.

Change-Id: I3c61f4482e5bb535e41ea699147c8c258ca6fb93
Reviewed-on: https://gerrit.libreoffice.org/24850
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-10 13:00:14 +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
Ashod Nakashian
d5578e30bc loleaflet: prevent viewers from changing Impress slides
Change-Id: I4928d111bde8c712c79ec566b0ca4520995ac598
Reviewed-on: https://gerrit.libreoffice.org/24813
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-10 03:46:04 +00:00
Pranav Kant
c68ba63f88 bccu#1771: Do not select row in calc while cursorvisible
... otherwise, shift + space combination would select the whole
row in calc even while editing. After this, row selection feature
using shift + space would only work while we are not editing,
that is, when text cursor is not visible.

Change-Id: I07ddf045d023487d70fa632edd7c173ed1df610d
2016-05-09 11:29:29 +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
50cc60e6f6 loleaflet: invalidate on activation
Invalidation for spreadsheet and presentation
are part-sensitive. The handler will take
care of this distinction and construct the correct
invalidate command.

Also, set active flag before firing invalidation.

Change-Id: I9e897750e0768b54cc1521d47d69b5dbb1a36244
Reviewed-on: https://gerrit.libreoffice.org/24779
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 05:21:05 +00:00
Ashod Nakashian
f9d7de86db loleaflet: don't show the start/end selection handles for viewers
The handles imply (and indeed are designed for) changing the
selection by dragging them around. Viewers can't change the
selection, so no reason to give them the selection handles either.

Change-Id: Ifa793ac982fd48be877e7ed7709f70890d8de194
Reviewed-on: https://gerrit.libreoffice.org/24770
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 16:14:15 +00:00
Ashod Nakashian
d8f6aa7146 loleaflet: remove unnecessary duplicate message
This message is already sent from CalcTilelayer.js.

Change-Id: I9f84d5f365dbfea38061e206d5d52e2201be22ed
Reviewed-on: https://gerrit.libreoffice.org/24769
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-08 16:13:11 +00:00
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
Ashod Nakashian
376b36b4c8 loleaflet: writer shouldn't signal page change when nothing changed
Change-Id: I1393f0c385f75c07d2024c7045d04eabc6937718
Reviewed-on: https://gerrit.libreoffice.org/24677
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-05 11:39:37 +00:00
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
207f4b5fc9 loleaflet: Emit 'editlock' only if changed
Change-Id: I0d08241b82ad105902ad6ca03f015efd0eb9fb2e
2016-05-05 12:33:57 +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