From 0690f45762175884f5846ebd3855220ec492f6d0 Mon Sep 17 00:00:00 2001 From: Antoine Beaubien Date: Sat, 30 May 2020 07:01:26 -0400 Subject: [PATCH] (I #1038) Add a Show/Hide left panel button (#2616) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add a Show/Hide left panel Add a Show/Hide left Facets-Undo/Redo panel. * Update summary-bar.js Simplify the code for the "hide-left-panel-button". * Remove the gap on the left of the button Remove the gap on the left of the button and align left with table. * Translated using Weblate (Japanese) Currently translated at 100.0% (740 of 740 strings) Translation: OpenRefine/Translations Translate-URL: https://hosted.weblate.org/projects/openrefine/translations/ja/ * Translated using Weblate (Japanese) Currently translated at 100.0% (171 of 171 strings) Translation: OpenRefine/wikidata Translate-URL: https://hosted.weblate.org/projects/openrefine/wikidata/ja/ * Translated using Weblate (Japanese) Currently translated at 100.0% (47 of 47 strings) Translation: OpenRefine/gdata Translate-URL: https://hosted.weblate.org/projects/openrefine/gdata/ja/ * Updated showhide (collapse) arrow image * Bolden the border dark-blue Bolden the border dark-blue * Changed from SPAN to A tag Changed from SPAN to A tag. * Update project.less Minor change: left: 22px; * Add a Show/Hide left panel Add a Show/Hide left Facets-Undo/Redo panel. * Update summary-bar.js Simplify the code for the "hide-left-panel-button". * Remove the gap on the left of the button Remove the gap on the left of the button and align left with table. * Updated showhide (collapse) arrow image * Bolden the border dark-blue Bolden the border dark-blue * Changed from SPAN to A tag Changed from SPAN to A tag. * Update project.less Minor change: left: 22px; * Changed cell.error to cell.errorMessage & added help data. (#2628) * Changed cell.error to cell.errorMessage & added help data. Changed cell.error to cell.errorMessage and added the informations into the internal help system. * FR Text correction * HU Fix text 3 instead of 2. * The show/hide button now changes side The show/hide button now changes side. * Update project.js Removed unneeded self. * Update summary-bar.js Removed unneeded self. * [Security] Bump jackson.version from 2.9.10 to 2.11.0 Bumps `jackson.version` from 2.9.10 to 2.11.0. Updates `jackson-databind` from 2.9.10 to 2.11.0 - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) Updates `jackson-annotations` from 2.9.10 to 2.11.0 - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) Updates `jackson-core` from 2.9.10 to 2.11.0 - [Release notes](https://github.com/FasterXML/jackson-core/releases) - [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.9.10...jackson-core-2.11.0) Signed-off-by: dependabot-preview[bot] * Translated using Weblate (Russian) Currently translated at 91.0% (674 of 740 strings) Translation: OpenRefine/Translations Translate-URL: https://hosted.weblate.org/projects/openrefine/translations/ru/ * Only show the database login fields when necessary (#2615) * DB login fields visibility controled by CSS The database login field’s visibility is now controled by CSS styling. * Change field name from Database to Database file. Change field name from Database to Database file. * Use full db name as CSS classes Use full db name instead of diminutives for the CSS classes. * Added translation to placeholders Added translation to the Input placeholders. * Undo a change, remerge Database field & File remerge Database field and DatabaseFile Field like before. * Created DatabaseSourceUI._updateDatabaseType(dbType) Created Refine.DatabaseSourceUI.prototype._updateDatabaseType(databaseType) * Make MySQL the default database * Update database-import-form.html Fixed typo. () * New default connection name value New default connection name value, translation of it, changing cssClassName from options to dbtype-options, adding the prefix "dbt-" to the db types and fix the changing of placeholder databaseName/databaseFileName when neccessary. * Fix issue with « saved connections » Fix issue with « saved connections » and added 2 defaults values for dbHost and dbType. * Default DB back to MySQL. * Update extensions/database/module/langs/translation-en.json Co-authored-by: Thad Guidry * Better default with « mysql » * Fix sqlite #databaseHost before calling self._updateDatabaseType() Fix $( "#databaseHost" ).val(self._defaultDatabaseHost) to be set before calling self._updateDatabaseType(self._defaultDatabaseType) that may change it. * Removed field name & fixed default connection name Removed field name text since it's populated from i18n and fixed the default connection name so that it has no space in it. * Little update to placeholder text Co-authored-by: Thad Guidry * Resize the grid UI as well Co-authored-by: Isao Matsunami Co-authored-by: Hosted Weblate Co-authored-by: Thad Guidry Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Tom Morris Co-authored-by: Artem Co-authored-by: Antonin Delpeuch --- .../core/images/leftpanel-showhide.png | Bin 0 -> 1279 bytes main/webapp/modules/core/scripts/project.js | 17 ++++++++ main/webapp/modules/core/styles/project.less | 6 +-- .../modules/core/styles/project/sidebar.less | 40 ++++++++++++++++++ 4 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 main/webapp/modules/core/images/leftpanel-showhide.png diff --git a/main/webapp/modules/core/images/leftpanel-showhide.png b/main/webapp/modules/core/images/leftpanel-showhide.png new file mode 100644 index 0000000000000000000000000000000000000000..6cb12bdfc8caf280ab9f945c2320f0be708b34fb GIT binary patch literal 1279 zcmds1>rWh26d!DCkg|mhEkSI^N*h{89cE^CW_GBS&dkoRo32zI8s2s-+m_ctU@4T? zCB-g9q=Zsk8rZn4<)I5LuR(+5B>+<-+U=GMHLbqf?=4-WHh8JXiy{~cs+&%6?nQz6!KJsF}n)GHbksR5Z39A z!mxFOUCOeHXgh<^mjg@trujkPR2nIn)6j=!-R? z9`rUeLo*tnO43lbz}M(u2sQ4);XJg$H29$(O(=MNUr{`o%tHh4P66tNzI|{BeF!Jv zIC=|ulj~suCh^xD$>2dAhypd%6aadTZIbb}N8M^QWS;mI(FPNG2^O*nQZ7MH^~jAkAJANbHD z@++mZD|uc?g>lpfeiAh)Y|!D@il-^Z;6(lDsAW4E2CvE}WhH57iXmB+B3Oc@7@1)h zju9DJ;X0OMi8YO(S-mpL5XxZn2A(%?Jk7BbDQY>6(b2Ljkb0h$2ufm6Exyy-esCtw0bGDN3>|OOhb)3XnRP;V4cJ zXl0p!rX^mGSlybL6Iqee3lgK1Sy|?l;2bNmlFDv+QTn$%{#UiJ|7mm_x^Wzj$N#xQ zf|YaxP3j1V;z)td=v-FbRkg{$XV$uZekC^q5#bA)>!`4$%~MW|@#FG9LVW4X)K&8I ztw?(4@ZKXws7J=Vfm+wX-0!FmbYR|l-+QWSN&4m-J6jbKVi~JZ<%d_Q z1z)(y?7o(LKR)U5`VTfy;Wy93xV|X3kelYaSKK@Eo;S#M@5d9@&9R@wg`2z1R&Tj8 zY9#Ub_zk~pyxI^P*<;&sT9|hlu6bs5Jf{iXueNM_Bg! zVs2?Au4%h5vg@vTX1w-F!%$%?A4Qp+MBd0Jg?V{=&d8$LGKxY_#eoER@!??G4VPv1 zuZ2*{S2@=o?|8oVQQ*b{?3RCd*V2<176`1vI&R;oTM4_`sQhS{NlG').attr("id", "hide-left-panel-button") + .addClass("visibility-panel-button") + .click(function() { Refine._showHideLeftPanel(); }) + .prependTo(ui.leftPanelTabs); + + $('').attr("id", "show-left-panel-button") + .addClass("visibility-panel-button") + .click(function() { Refine._showHideLeftPanel(); }) + .prependTo(ui.toolPanelDiv); + ui.summaryBar = new SummaryBar(ui.summaryBarDiv); ui.browsingEngine = new BrowsingEngine(ui.facetPanelDiv, uiState.facets || []); ui.processPanel = new ProcessPanel(ui.processPanelDiv); @@ -164,6 +176,11 @@ function initializeUI(uiState) { } } +Refine._showHideLeftPanel = function() { + $('div#body').toggleClass("hide-left-panel"); + resizeAll(); +}; + Refine.setTitle = function(status) { var title = theProject.metadata.name + " - OpenRefine"; if (status) { diff --git a/main/webapp/modules/core/styles/project.less b/main/webapp/modules/core/styles/project.less index 8fa34dce0..3ba633dbc 100644 --- a/main/webapp/modules/core/styles/project.less +++ b/main/webapp/modules/core/styles/project.less @@ -102,9 +102,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } #summary-bar { - position: absolute; - top: @padding_normal; - left: @padding_normal; + display: inline-block; + margin: 7px 0px 0px 4px; + padding: 0px; font-size: 1.8em; font-weight: bold; } diff --git a/main/webapp/modules/core/styles/project/sidebar.less b/main/webapp/modules/core/styles/project/sidebar.less index 6e66e2c3d..c19ec34b7 100644 --- a/main/webapp/modules/core/styles/project/sidebar.less +++ b/main/webapp/modules/core/styles/project/sidebar.less @@ -107,6 +107,46 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. line-height: 1.3; } +a.visibility-panel-button { + display: inline-block; + vertical-align: middle; + width: 17px; + height: 19px; + text-decoration: none; + background-image: url(../../images/leftpanel-showhide.png); + background-repeat: no-repeat; + background-position: 0px 0px; +} + +div#body.hide-left-panel div#left-panel { + display: none; +} + +div#body #show-left-panel-button { + margin: 0px 7px 0px 0px; + padding: 7px 0px 0px 0px; + display: none; +} + +div#body.hide-left-panel a#show-left-panel-button { + background-position: -34px 0px; + display: inline-block; +} + +div#body.hide-left-panel a#show-left-panel-button:hover { + background-position: -51px 0px; +} + +div#body div#left-panel a#hide-left-panel-button { + float: right; + margin: 0px 7px 0 0; + padding: 0px 0px 0px 0px; +} + +div#body div#left-panel a#hide-left-panel-button:hover { + background-position: -17px 0px; +} + @history_done_background: #fff; @history_undone_background: @chrome_secondary; @history_entry_index_width: 30px;