From d56b256cb3b6ae612677f340a120d766667ba89d Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Tue, 4 Jun 2019 09:46:48 +0300 Subject: [PATCH] [PE mobile] Add Collaboration into Toolbar --- .../mobile/app/template/Toolbar.template | 5 +++++ apps/presentationeditor/mobile/app/view/Toolbar.js | 10 ++++++++-- .../mobile/resources/css/app-material.css | 5 +++++ .../mobile/resources/less/material/_icons.less | 5 +++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/apps/presentationeditor/mobile/app/template/Toolbar.template b/apps/presentationeditor/mobile/app/template/Toolbar.template index 5db722d62..36129bd90 100644 --- a/apps/presentationeditor/mobile/app/template/Toolbar.template +++ b/apps/presentationeditor/mobile/app/template/Toolbar.template @@ -45,6 +45,11 @@ <% } %> + <% if (!phone) { %> + + <% } %> diff --git a/apps/presentationeditor/mobile/app/view/Toolbar.js b/apps/presentationeditor/mobile/app/view/Toolbar.js index c40510fc0..690eb4b94 100644 --- a/apps/presentationeditor/mobile/app/view/Toolbar.js +++ b/apps/presentationeditor/mobile/app/view/Toolbar.js @@ -64,7 +64,8 @@ define([ "click #toolbar-add" : "showInserts", "click #toolbar-settings" : "showSettings", "click #toolbar-preview" : "showPreview", - "click #toolbar-edit-document": "editDocument" + "click #toolbar-edit-document": "editDocument", + "click #toolbar-collaboration" : "showCollaboration" }, // Set innerHTML and get the references to the DOM elements @@ -101,7 +102,7 @@ define([ setMode: function (mode) { if (mode.isEdit) { - $('#toolbar-edit, #toolbar-add, #toolbar-undo, #toolbar-redo').show(); + $('#toolbar-edit, #toolbar-add, #toolbar-undo, #toolbar-redo, #toolbar-collaboration').show(); } else if (mode.canEdit && mode.canRequestEditRights){ $('#toolbar-edit-document').show(); } @@ -159,6 +160,11 @@ define([ Common.Gateway.requestEditRights(); }, + //Collaboration + showCollaboration: function () { + PE.getController('Collaboration').showModal(); + }, + textBack: 'Back' } })(), PE.Views.Toolbar || {})) diff --git a/apps/presentationeditor/mobile/resources/css/app-material.css b/apps/presentationeditor/mobile/resources/css/app-material.css index 20340372b..5d509710d 100644 --- a/apps/presentationeditor/mobile/resources/css/app-material.css +++ b/apps/presentationeditor/mobile/resources/css/app-material.css @@ -6321,6 +6321,11 @@ i.icon.icon-collaboration { height: 22px; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2022%2022%22%20fill%3D%22%23fff%22%3E%3Cg%3E%3Cpolygon%20points%3D%2210.9%2C16.9%202%2C8.1%204.1%2C6%2011.1%2C12.8%2017.9%2C6%2020%2C8.1%2011.2%2C16.9%2011.1%2C17%20%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); } +.navbar i.icon.icon-collaboration { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M14.9912%206C14.9912%208.18203%2014.4464%209.76912%2013.7789%2010.7492C13.101%2011.7447%2012.4042%2012%2011.9912%2012C11.5782%2012%2010.8814%2011.7447%2010.2035%2010.7492C9.53601%209.76912%208.99121%208.18203%208.99121%206C8.99121%204.23017%2010.4571%203%2011.9912%203C13.5254%203%2014.9912%204.23017%2014.9912%206ZM13.4917%2013.6397C13.0059%2013.8771%2012.4989%2014%2011.9912%2014C11.4861%2014%2010.9817%2013.8784%2010.4983%2013.6434C8.53188%2014.3681%206.94518%2015.0737%205.78927%2015.7768C4.10512%2016.8011%204%2017.4079%204%2017.5C4%2017.7664%204.1014%2018.3077%205.27104%2018.8939C6.50029%2019.5099%208.64545%2019.9999%2012%2020C15.3546%2020%2017.4997%2019.5099%2018.7289%2018.8939C19.8986%2018.3078%2020%2017.7664%2020%2017.5C20%2017.4079%2019.8949%2016.8011%2018.2107%2015.7768C17.0529%2015.0726%2015.4627%2014.3657%2013.4917%2013.6397ZM15.2272%2012.1594C16.2765%2010.7825%2016.9912%208.67814%2016.9912%206C16.9912%203%2014.5%201%2011.9912%201C9.48242%201%206.99121%203%206.99121%206C6.99121%208.68159%207.70777%2010.7879%208.75931%2012.1647C4.60309%2013.7964%202%2015.4951%202%2017.5C2%2019.9852%205%2021.9999%2012%2022C19%2022%2022%2019.9852%2022%2017.5C22%2015.4929%2019.3913%2013.7927%2015.2272%2012.1594Z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E"); +} .sailfish i.icon.icon-text-align-center { background-color: transparent; -webkit-mask-image: none; diff --git a/apps/presentationeditor/mobile/resources/less/material/_icons.less b/apps/presentationeditor/mobile/resources/less/material/_icons.less index a3518e8af..642284080 100644 --- a/apps/presentationeditor/mobile/resources/less/material/_icons.less +++ b/apps/presentationeditor/mobile/resources/less/material/_icons.less @@ -435,5 +435,10 @@ i.icon { height: 22px; .encoded-svg-background(''); } + &.icon-collaboration { + width: 24px; + height: 24px; + .encoded-svg-background(''); + } } } \ No newline at end of file