From 5462610baf9ba44292150cda1314aa58f0e5603b Mon Sep 17 00:00:00 2001 From: Jorge Rimblas Date: Fri, 5 Jun 2020 08:48:51 -0500 Subject: [PATCH] Select2, waitPopup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Select2 for selecting tables * Added “waitPopup” indicator during re-order * Extra drag handle * Annonymous Font * Preview animation --- README.md | 26 +- apex/f108.sql | 2445 ++++++++++++++++++++++++++++++++++++++++++++++++- preview.gif | Bin 0 -> 16022005 bytes 3 files changed, 2450 insertions(+), 21 deletions(-) create mode 100644 preview.gif diff --git a/README.md b/README.md index 779086d..03a15d2 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,42 @@ # OCD Table Reorderer -To the OCD developer in all of us. +_To the OCD developer in all of us._ + +You have a carefully crafted table. Then the requirements change, as they always do, and you an important column to the table. Where does that column go? Well, at the end of the table of course. + +Well, I say no more. + +## Preview +![Alt text](/preview.gif?raw=true "Preview") + + +## Q&A +* Is it safe? I think so, but **USE AT YOUR OWN RISK** +* Is the data moved? No, not at all! +* Is a new table created? No, not at all! ## Install This is a straightforward single page APEX app compatible with APEX 5.1 -However, if you're on APEX 18.2 or beyond, you'll need to remove the JS line that references `jquery.ui.sortable.min.js` on the JavaScript File URLs section of p1. If you don't the drag and drop won't work. +### 18.2 +If you're on APEX 18.2 or beyond, you'll need to **remove** the JS line that references `jquery.ui.sortable.min.js` on the JavaScript File URLs section of p1. If you don't the drag and drop won't work. + +### 19.1 +If you're on 19.1 or beyond, then change the `clearMessages` JS function to use `apex.theme42.util.configAPEXMsgs` instead of `apex.theme42.configureSuccessMessages`. ## Roadmap * Controls to move a column to the Beginning & End * Pre-Defined column arrangements (like move Audit Columns to the end) +* Block Move: select multiple columns that will move together ### Credits -The original script that kick this off is from [Dermot ONeill](https://twitter.com/dermotoneill) with his [SQLcl](https://www.oracle.com/database/technologies/appdev/sqlcl.html) [Aliases & The Invisible Column Trick](http://dermotoneill.blogspot.co.uk/2015/11/sqlcl-aliases-invisible-column-trick.html). +The original script that kick this off is from [Dermot ONeill](https://twitter.com/dermotoneill) with his [SQLcl](https://www.oracle.com/database/technologies/appdev/sqlcl.html) [Aliases & The Invisible Column Trick](http://dermotoneill.blogspot.co.uk/2015/11/sqlcl-aliases-invisible-column-trick.html). Original [pos.xml](https://gist.github.com/dermotoneill/b654404f112846212d4d). I've shared his gem with many people, but then [Gemma Wood](https://twitter.com/gemmawood) provided me with a pretty nice enhancement that moves the "Audit Columns" of a table to the end. You can [get that here](scripts/apos.xml). You can load it into SQLcl just like Dermont shows in his blog: ``` -alias load c:\pos.xml +alias load c:\apos.xml ``` diff --git a/apex/f108.sql b/apex/f108.sql index da4c4b6..4c840b4 100644 --- a/apex/f108.sql +++ b/apex/f108.sql @@ -26,7 +26,7 @@ prompt APPLICATION 108 - The OCD Table Re-Orderer -- Application Export: -- Application: 108 -- Name: The OCD Table Re-Orderer --- Date and Time: 22:27 Thursday June 4, 2020 +-- Date and Time: 08:48 Friday June 5, 2020 -- Exported By: JMR -- Flashback: 0 -- Export Type: Application Export @@ -38,7 +38,7 @@ prompt APPLICATION 108 - The OCD Table Re-Orderer -- Pages: 2 -- Items: 3 -- Processes: 5 --- Regions: 4 +-- Regions: 5 -- Buttons: 1 -- Dynamic Actions: 2 -- Shared Components: @@ -61,6 +61,7 @@ prompt APPLICATION 108 - The OCD Table Re-Orderer -- Breadcrumb: 1 -- Button: 3 -- Report: 10 +-- Plug-ins: 1 -- Globalization: -- Reports: -- Supporting Objects: Excluded @@ -105,7 +106,7 @@ wwv_flow_api.create_flow( ,p_rejoin_existing_sessions=>'N' ,p_csv_encoding=>'Y' ,p_last_updated_by=>'JORGE@RIMBLAS.COM' -,p_last_upd_yyyymmddhh24miss=>'20200604222634' +,p_last_upd_yyyymmddhh24miss=>'20200605084352' ,p_file_prefix => nvl(wwv_flow_application_install.get_static_app_file_prefix,'') ,p_files_version=>2 ,p_ui_type_name => null @@ -193,6 +194,12 @@ wwv_flow_api.create_plugin_setting( ,p_plugin_type=>'REGION TYPE' ,p_plugin=>'NATIVE_CSS_CALENDAR' ); +wwv_flow_api.create_plugin_setting( + p_id=>wwv_flow_api.id(10892733776701612) +,p_plugin_type=>'ITEM TYPE' +,p_plugin=>'PLUGIN_BE.CTB.SELECT2' +,p_attribute_07=>'SELECT2' +); end; / prompt --application/shared_components/security/authorizations @@ -3827,8 +3834,9 @@ wwv_flow_api.create_row_template( ,p_row_template1=>wwv_flow_string.join(wwv_flow_t_varchar2( '
  • ', '
    ', -'
    ', +'
    ', ' #VISIBLE_CHK# #COLUMN_NAME#', +'
    ', '
    ', '
  • ')) ,p_row_template_before_rows=>'