Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5_fork
Commits
7883bb10
Commit
7883bb10
authored
Feb 02, 2016
by
iv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OfficeJS drive: Fix unecessary line and add message errors for cd/ls 'commands'.
parent
409c5988
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
27 deletions
+32
-27
bt5/erp5_officejs_drive/PathTemplateItem/web_page_module/gadget_officejs_drive_page_browse_js.xml
.../web_page_module/gadget_officejs_drive_page_browse_js.xml
+30
-26
bt5/erp5_officejs_drive/PathTemplateItem/web_page_module/gadget_officejs_drive_page_browse_storage_html.xml
...module/gadget_officejs_drive_page_browse_storage_html.xml
+2
-1
No files found.
bt5/erp5_officejs_drive/PathTemplateItem/web_page_module/gadget_officejs_drive_page_browse_js.xml
View file @
7883bb10
...
@@ -167,32 +167,37 @@
...
@@ -167,32 +167,37 @@
\n
\n
// if command given: proceed\n
// if command given: proceed\n
if (command) {\n
if (command) {\n
switch (command)
{\n
try
{\n
case \'cd\':
\n
switch (command) {
\n
case \'ls
\':\n
case \'cd
\':\n
if (args.length === 1) {\n
if (args.length === 1) {\n
return gadget.redirect({\n
return gadget.redirect({\n
position: absolutePosition(gadget.props.currentPosition, args[0])\n
position: absolutePosition(gadget.props.currentPosition, args[0])\n
});\n
});\n
}\n
}\n
throw
(\'Usage of \' + command + \' requires a single argument.\');\n
throw new Error
(\'Usage of \' + command + \' requires a single argument.\');\n
\n
\n
case \'vim\':\n
case \'vim\':\n
case \'vi\':\n
case \'vi\':\n
if (args.length === 1) {\n
if (args.length === 1) {\n
return gadget.redirect({\n
return gadget.redirect({\n
page: \'edit\',\n
page: \'edit\',\n
position: absolutePosition(\n
position: absolutePosition(\n
gadget.props.currentPosition,\n
gadget.props.currentPosition,\n
position.join(\'/\')\n
position.join(\'/\')\n
),\n
),\n
resource: resource\n
resource: resource\n
});\n
});\n
}\n
throw new Error(\'Usage of \' + command + \' requires a single argument.\');\n
default:\n
throw new Error(\'Unknown command: \' + command);\n
}\n
}\n
throw (\'Usage of \' + command + \' requires a single argument.\');\n
} catch (e) {\n
default:\n
gadget.props.element.querySelector(\'.error\').textContent = e.name +\n
throw (\'Unknown command: \' + command);\n
": " +\n
}\n
e.message;\n
}
}\n
}\n
})\n
})\n
\n
\n
...
@@ -208,7 +213,6 @@
...
@@ -208,7 +213,6 @@
}\n
}\n
gadget.props.currentPosition = options.position;\n
gadget.props.currentPosition = options.position;\n
gadget.props.element.querySelector(\'input\').value = \'\';\n
gadget.props.element.querySelector(\'input\').value = \'\';\n
gadget.props.element.querySelector(\'.position\').value = options.position;\n
\n
\n
// clean previous ul children\n
// clean previous ul children\n
while (ul.hasChildNodes()) {\n
while (ul.hasChildNodes()) {\n
...
@@ -230,7 +234,7 @@
...
@@ -230,7 +234,7 @@
liContent = document.createElement(\'a\');\n
liContent = document.createElement(\'a\');\n
\n
\n
liContent.setAttribute(\'href\', \'#page=edit&resource=\' +\n
liContent.setAttribute(\'href\', \'#page=edit&resource=\' +\n
key + \'&position=\' + options.position);\n
key + \'&position=\' + options.position);\n
liContent.appendChild(resourceName);\n
liContent.appendChild(resourceName);\n
} else {\n
} else {\n
liContent = resourceName;\n
liContent = resourceName;\n
...
...
bt5/erp5_officejs_drive/PathTemplateItem/web_page_module/gadget_officejs_drive_page_browse_storage_html.xml
View file @
7883bb10
...
@@ -134,8 +134,9 @@
...
@@ -134,8 +134,9 @@
<body>
\n
<body>
\n
<h1>
Super OfficeJS Drive
</h1>
\n
<h1>
Super OfficeJS Drive
</h1>
\n
<form>
\n
<form>
\n
position:
<input
type=
"text"
name=
"position
"
>
\n
<input
type=
"text
"
>
\n
</form>
\n
</form>
\n
<div><a
class=
"error"
></a></div>
\n
<ul>
\n
<ul>
\n
</ul>
\n
</ul>
\n
</body>
\n
</body>
\n
...
...
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