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
Ludovic Kiefer
erp5
Commits
c7bc4b68
Commit
c7bc4b68
authored
Jul 16, 2017
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: Bookmark, remove CRLF endlines on a few files
parent
222f7a25
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
181 additions
and
181 deletions
+181
-181
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_add_bookmark_js.js
...m/web_page_module/gadget_officejs_page_add_bookmark_js.js
+69
-69
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_add_bookmark_js.xml
.../web_page_module/gadget_officejs_page_add_bookmark_js.xml
+3
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_list_js.js
.../web_page_module/gadget_officejs_page_bookmark_list_js.js
+106
-106
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_list_js.xml
...web_page_module/gadget_officejs_page_bookmark_list_js.xml
+3
-3
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_add_bookmark_js.js
View file @
c7bc4b68
/*globals window, RSVP, rJS*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(
function
(
window
,
RSVP
,
rJS
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
);
gadget_klass
.
ready
(
function
(
g
)
{
g
.
props
=
{};
return
g
.
getElement
()
.
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
g
.
props
.
deferred
=
RSVP
.
defer
();
});
})
.
declareAcquiredMethod
(
"
post
"
,
"
jio_post
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
'
getSetting
'
,
'
getSetting
'
)
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
gadget
.
props
.
options
=
options
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getSetting
(
"
portal_type
"
),
gadget
.
getSetting
(
"
document_title
"
),
gadget
.
getSetting
(
"
parent_relative_url
"
)
]);
}).
push
(
function
(
answer_list
)
{
gadget
.
props
.
portal_type
=
answer_list
[
0
];
gadget
.
props
.
document_title
=
answer_list
[
1
];
gadget
.
props
.
parent_relative_url
=
answer_list
[
2
];
return
gadget
.
updateHeader
({
title
:
"
New
"
+
gadget
.
props
.
document_title
});
})
.
push
(
function
()
{
gadget
.
props
.
deferred
.
resolve
();
});
})
.
declareService
(
function
()
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
props
.
deferred
.
promise
;
})
.
push
(
function
()
{
var
doc
=
{
// XXX Hardcoded
parent_relative_url
:
gadget
.
props
.
parent_relative_url
,
portal_type
:
gadget
.
props
.
portal_type
};
return
gadget
.
post
(
doc
);
})
.
push
(
function
(
data
)
{
return
gadget
.
redirect
({
jio_key
:
data
,
page
:
"
view
"
});
});
});
/*globals window, RSVP, rJS*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(
function
(
window
,
RSVP
,
rJS
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
);
gadget_klass
.
ready
(
function
(
g
)
{
g
.
props
=
{};
return
g
.
getElement
()
.
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
g
.
props
.
deferred
=
RSVP
.
defer
();
});
})
.
declareAcquiredMethod
(
"
post
"
,
"
jio_post
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
'
getSetting
'
,
'
getSetting
'
)
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
gadget
.
props
.
options
=
options
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getSetting
(
"
portal_type
"
),
gadget
.
getSetting
(
"
document_title
"
),
gadget
.
getSetting
(
"
parent_relative_url
"
)
]);
}).
push
(
function
(
answer_list
)
{
gadget
.
props
.
portal_type
=
answer_list
[
0
];
gadget
.
props
.
document_title
=
answer_list
[
1
];
gadget
.
props
.
parent_relative_url
=
answer_list
[
2
];
return
gadget
.
updateHeader
({
title
:
"
New
"
+
gadget
.
props
.
document_title
});
})
.
push
(
function
()
{
gadget
.
props
.
deferred
.
resolve
();
});
})
.
declareService
(
function
()
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
props
.
deferred
.
promise
;
})
.
push
(
function
()
{
var
doc
=
{
// XXX Hardcoded
parent_relative_url
:
gadget
.
props
.
parent_relative_url
,
portal_type
:
gadget
.
props
.
portal_type
};
return
gadget
.
post
(
doc
);
})
.
push
(
function
(
data
)
{
return
gadget
.
redirect
({
jio_key
:
data
,
page
:
"
view
"
});
});
});
}(
window
,
RSVP
,
rJS
));
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_add_bookmark_js.xml
View file @
c7bc4b68
...
...
@@ -222,7 +222,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
cedric.le.ninivin
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
56.64652.42771.37444
</string>
</value>
<value>
<string>
9
60.50178.45695.2645
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
1
485780817.22
</float>
<float>
1
500208399.34
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_list_js.js
View file @
c7bc4b68
/*globals window, RSVP, rJS*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(
function
(
window
,
RSVP
,
rJS
)
{
"
use strict
"
;
rJS
(
window
)
.
ready
(
function
(
g
)
{
g
.
props
=
{};
return
g
.
getElement
()
.
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
});
})
.
ready
(
function
(
g
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
g
.
translate
(
"
validated
"
),
g
.
translate
(
"
invalidated
"
),
g
.
translate
(
"
Not synced!
"
),
g
.
translate
(
"
Waiting for approval
"
)
]);
})
.
push
(
function
(
result_list
)
{
g
.
props
.
translation_dict
=
{
"
validated
"
:
result_list
[
0
],
"
invalidated
"
:
result_list
[
1
],
"
Not synced!
"
:
result_list
[
2
],
"
Waiting for approval
"
:
result_list
[
3
]
};
});
})
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
'
getSetting
'
,
'
getSetting
'
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
allowPublicAcquisition
(
"
jio_allDocs
"
,
function
(
param_list
)
{
var
gadget
=
this
;
return
this
.
jio_allDocs
.
apply
(
this
,
param_list
)
.
push
(
function
(
result
)
{
var
i
,
len
;
for
(
i
=
0
,
len
=
result
.
data
.
total_rows
;
i
<
len
;
i
+=
1
)
{
// XXX jIO does not create UUID with module inside
if
(
result
.
data
.
rows
[
i
].
id
.
indexOf
(
"
module
"
)
===
-
1
)
{
result
.
data
.
rows
[
i
].
value
.
state
=
gadget
.
props
.
translation_dict
[
"
Not synced!
"
];
}
else
{
result
.
data
.
rows
[
i
].
value
.
state
=
gadget
.
props
.
translation_dict
[
result
.
data
.
rows
[
i
].
value
.
local_state
||
"
Waiting for approval
"
];
}
}
return
result
;
});
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getSetting
(
"
portal_type
"
),
gadget
.
getSetting
(
"
document_title_plural
"
)
]);
})
.
push
(
function
(
answer_list
)
{
gadget
.
props
.
portal_type
=
answer_list
[
0
];
gadget
.
props
.
bookmark_title_plural
=
answer_list
[
1
];
return
gadget
.
getUrlFor
({
page
:
"
add_bookmark
"
});
})
.
push
(
function
(
url
)
{
return
gadget
.
updateHeader
({
title
:
gadget
.
props
.
bookmark_title_plural
,
add_url
:
url
});
})
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
listbox
"
);
})
.
push
(
function
(
listbox
)
{
return
listbox
.
render
({
search_page
:
'
bookmark_list
'
,
search
:
options
.
search
,
column_list
:
[{
select
:
'
title
'
,
title
:
'
Title
'
},
{
select
:
'
url_string
'
,
title
:
'
URL
'
},
{
select
:
'
description
'
,
title
:
'
Description
'
}],
query
:
{
query
:
'
portal_type:("
'
+
gadget
.
props
.
portal_type
+
'
")
'
,
select_list
:
[
'
title
'
,
'
url_string
'
,
'
description
'
],
limit
:
[
0
,
30
],
sort_on
:
[[
"
modification_date
"
,
"
descending
"
]]
}
});
});
});
/*globals window, RSVP, rJS*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(
function
(
window
,
RSVP
,
rJS
)
{
"
use strict
"
;
rJS
(
window
)
.
ready
(
function
(
g
)
{
g
.
props
=
{};
return
g
.
getElement
()
.
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
});
})
.
ready
(
function
(
g
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
g
.
translate
(
"
validated
"
),
g
.
translate
(
"
invalidated
"
),
g
.
translate
(
"
Not synced!
"
),
g
.
translate
(
"
Waiting for approval
"
)
]);
})
.
push
(
function
(
result_list
)
{
g
.
props
.
translation_dict
=
{
"
validated
"
:
result_list
[
0
],
"
invalidated
"
:
result_list
[
1
],
"
Not synced!
"
:
result_list
[
2
],
"
Waiting for approval
"
:
result_list
[
3
]
};
});
})
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
'
getSetting
'
,
'
getSetting
'
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
allowPublicAcquisition
(
"
jio_allDocs
"
,
function
(
param_list
)
{
var
gadget
=
this
;
return
this
.
jio_allDocs
.
apply
(
this
,
param_list
)
.
push
(
function
(
result
)
{
var
i
,
len
;
for
(
i
=
0
,
len
=
result
.
data
.
total_rows
;
i
<
len
;
i
+=
1
)
{
// XXX jIO does not create UUID with module inside
if
(
result
.
data
.
rows
[
i
].
id
.
indexOf
(
"
module
"
)
===
-
1
)
{
result
.
data
.
rows
[
i
].
value
.
state
=
gadget
.
props
.
translation_dict
[
"
Not synced!
"
];
}
else
{
result
.
data
.
rows
[
i
].
value
.
state
=
gadget
.
props
.
translation_dict
[
result
.
data
.
rows
[
i
].
value
.
local_state
||
"
Waiting for approval
"
];
}
}
return
result
;
});
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getSetting
(
"
portal_type
"
),
gadget
.
getSetting
(
"
document_title_plural
"
)
]);
})
.
push
(
function
(
answer_list
)
{
gadget
.
props
.
portal_type
=
answer_list
[
0
];
gadget
.
props
.
bookmark_title_plural
=
answer_list
[
1
];
return
gadget
.
getUrlFor
({
page
:
"
add_bookmark
"
});
})
.
push
(
function
(
url
)
{
return
gadget
.
updateHeader
({
title
:
gadget
.
props
.
bookmark_title_plural
,
add_url
:
url
});
})
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
listbox
"
);
})
.
push
(
function
(
listbox
)
{
return
listbox
.
render
({
search_page
:
'
bookmark_list
'
,
search
:
options
.
search
,
column_list
:
[{
select
:
'
title
'
,
title
:
'
Title
'
},
{
select
:
'
url_string
'
,
title
:
'
URL
'
},
{
select
:
'
description
'
,
title
:
'
Description
'
}],
query
:
{
query
:
'
portal_type:("
'
+
gadget
.
props
.
portal_type
+
'
")
'
,
select_list
:
[
'
title
'
,
'
url_string
'
,
'
description
'
],
limit
:
[
0
,
30
],
sort_on
:
[[
"
modification_date
"
,
"
descending
"
]]
}
});
});
});
}(
window
,
RSVP
,
rJS
));
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_bookmark_list_js.xml
View file @
c7bc4b68
...
...
@@ -222,7 +222,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
cedric.le.ninivin
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
56.64652.30281.58163
</string>
</value>
<value>
<string>
9
60.50478.26108.37085
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
1
485780674.63
</float>
<float>
1
500225770.04
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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