From 9a2381508be237ea6372e42064198c2d73261147 Mon Sep 17 00:00:00 2001 From: Chunlin Zhang Date: Mon, 13 Jan 2020 13:49:15 +0800 Subject: [PATCH 1/3] add LICENSE. --- LICENSE | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fbe74e8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2020, Chunlin Zhang +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From 3607318dbbab557af737243aeb246c024d79e340 Mon Sep 17 00:00:00 2001 From: Chunlin Zhang Date: Thu, 16 Jan 2020 16:30:39 +0800 Subject: [PATCH 2/3] apijson-table: add hook_viewedit --- demo/apps/tables/templates/Tables/list.html | 2 +- .../apijson/templates/vue/inc_apijson_table.html | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/demo/apps/tables/templates/Tables/list.html b/demo/apps/tables/templates/Tables/list.html index b15e49e..f6dc9c2 100644 --- a/demo/apps/tables/templates/Tables/list.html +++ b/demo/apps/tables/templates/Tables/list.html @@ -7,7 +7,7 @@
{{if role!="ADMIN":}} - + {{pass #if}}
diff --git a/uliweb_apijson/apijson/templates/vue/inc_apijson_table.html b/uliweb_apijson/apijson/templates/vue/inc_apijson_table.html index d8f306b..35fcbf8 100644 --- a/uliweb_apijson/apijson/templates/vue/inc_apijson_table.html +++ b/uliweb_apijson/apijson/templates/vue/inc_apijson_table.html @@ -8,7 +8,8 @@ "custom_tcolumns_render_generator", "hook_init", //hook_init(vm), will invoke in mounted() "hook_ajax_params", //hook_ajax_params(method,action,params), will invoke before ajax action - "hook_add" //hook_add(vm), customize the add action + "hook_add", //hook_add(vm), customize the add action + "hook_viewedit" //hook_viewedit(vm), customize the add action ], template: `
Add

@@ -16,7 +17,7 @@ - + @@ -31,7 +32,7 @@
- + @@ -246,6 +247,11 @@ }) }, show: function(params){ + if (this.hook_viewedit!=null) { + this.hook_viewedit(this) + return + } + var row = params.row this.viewedit_items = [] if (this.config_viewedit_fields!=null) { From 3e0bf9c40c140a46ed747311f9d952815b67bef7 Mon Sep 17 00:00:00 2001 From: Chunlin Zhang Date: Thu, 16 Jan 2020 16:56:10 +0800 Subject: [PATCH 3/3] fix typo --- uliweb_apijson/apijson/templates/vue/inc_apijson_viewedit.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uliweb_apijson/apijson/templates/vue/inc_apijson_viewedit.html b/uliweb_apijson/apijson/templates/vue/inc_apijson_viewedit.html index 151a132..c57711c 100644 --- a/uliweb_apijson/apijson/templates/vue/inc_apijson_viewedit.html +++ b/uliweb_apijson/apijson/templates/vue/inc_apijson_viewedit.html @@ -15,7 +15,7 @@ - {{block custom_viewedit_componet}}{{end custom_viewedit_componet}} + {{block custom_viewedit_component}}{{end custom_viewedit_component}} Save