Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
erp5
Commits
8adf0a4a
Commit
8adf0a4a
authored
Jul 30, 2014
by
Romain Courteaud
Committed by
Sebastien Robin
Aug 08, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to configure a different frontpage from a parent gadget.
parent
93aa8302
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
10 deletions
+29
-10
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_js.xml
...i/PathTemplateItem/web_page_module/rjs_gadget_erp5_js.xml
+28
-9
bt5/erp5_web_renderjs_ui/bt/revision
bt5/erp5_web_renderjs_ui/bt/revision
+1
-1
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_js.xml
View file @
8adf0a4a
...
@@ -113,10 +113,19 @@
...
@@ -113,10 +113,19 @@
/////////////////////////////////////////////////////////////////\n
/////////////////////////////////////////////////////////////////\n
// Some functions\n
// Some functions\n
/////////////////////////////////////////////////////////////////\n
/////////////////////////////////////////////////////////////////\n
function createJio(gadget) {\n
return gadget.getDeclaredGadget("jio_gadget")\n
.push(function (jio_gadget) {\n
return jio_gadget.createJio({\n
type: "erp5",\n
url: gadget.props.hateoas_url\n
});\n
});\n
}\n
function renderFrontpage(gadget, options) {\n
function renderFrontpage(gadget, options) {\n
document.querySelector("h1").textContent = "ERP5";\n
document.querySelector("h1").textContent = "ERP5";\n
\n
\n
return gadget.declareGadget(
"gadget_erp5_pt_frontpage.html"
, {\n
return gadget.declareGadget(
gadget.props.frontpage_gadget
, {\n
scope: "frontpage_gadget"\n
scope: "frontpage_gadget"\n
})\n
})\n
.push(function (sub_gadget) {\n
.push(function (sub_gadget) {\n
...
@@ -190,19 +199,18 @@
...
@@ -190,19 +199,18 @@
/////////////////////////////////////////////////////////////////\n
/////////////////////////////////////////////////////////////////\n
// Init local properties\n
// Init local properties\n
.ready(function (g) {\n
.ready(function (g) {\n
g.props = {};\n
g.props = {\n
frontpage_gadget: "gadget_erp5_pt_frontpage.html",\n
hateoas_url: "https://softinst51669.host.vifib.net/erp5/web_site_module/hateoas/",\n
action_view: "action_object_view",\n
default_view_reference: "view",\n
};\n
})\n
})\n
\n
\n
// Configure jIO to use localstorage\n
// Configure jIO to use localstorage\n
// And load configuration from server\n
// And load configuration from server\n
.ready(function (g) {\n
.ready(function (g) {\n
return g.getDeclaredGadget("jio_gadget")\n
return createJio(g);\n
.push(function (jio_gadget) {\n
return jio_gadget.createJio({\n
type: "erp5",\n
url: "https://softinst51669.host.vifib.net/erp5/web_site_module/hateoas/"\n
});\n
});\n
})\n
})\n
\n
\n
/////////////////////////////////////////////////////////////////\n
/////////////////////////////////////////////////////////////////\n
...
@@ -271,6 +279,17 @@
...
@@ -271,6 +279,17 @@
/////////////////////////////////////////////////////////////////\n
/////////////////////////////////////////////////////////////////\n
// declared methods\n
// declared methods\n
/////////////////////////////////////////////////////////////////\n
/////////////////////////////////////////////////////////////////\n
// Render the page\n
.declareMethod(\'configure\', function (options) {\n
var key;\n
for (key in options) {\n
if (options.hasOwnProperty(key)) {\n
this.props[key] = options[key];\n
}\n
}\n
return createJio(this);\n
})\n
\n
// Render the page\n
// Render the page\n
.declareMethod(\'render\', function (options) {\n
.declareMethod(\'render\', function (options) {\n
var gadget = this,\n
var gadget = this,\n
...
...
bt5/erp5_web_renderjs_ui/bt/revision
View file @
8adf0a4a
10
11
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment