Commit 6455b899 authored by Romain Courteaud's avatar Romain Courteaud Committed by Sebastien Robin

Add a link to create new document

parent 388a6604
...@@ -162,8 +162,14 @@ html.ui-mobile legend, .ui-btn, .ui-li-static, html.ui-mobile body form label {\ ...@@ -162,8 +162,14 @@ html.ui-mobile legend, .ui-btn, .ui-li-static, html.ui-mobile body form label {\
font-family: Helvetica, Arial, sans-serif;\n font-family: Helvetica, Arial, sans-serif;\n
font-size: 90%;\n font-size: 90%;\n
}\n }\n
html body .ui-header .ui-btn {\n html body .ui-controlgroup.ui-btn-right,\n
font-size: 85%\n html body .ui-header > .ui-btn {\n
font-size: 90%;\n
}\n
/* fix font-size on notext buttons, so icons don\'t zoom, JQMs-px font-size */\n
html body .ui-header .ui-controlgroup .ui-btn,\n
html body .ui-footer .ui-controlgroup .ui-btn {\n
font-size: 100%;\n
}\n }\n
\n \n
\n \n
...@@ -865,6 +871,11 @@ html head + body .ui-body-b.ui-focus{\n ...@@ -865,6 +871,11 @@ html head + body .ui-body-b.ui-focus{\n
.ui-header .ui-btn-right {\n .ui-header .ui-btn-right {\n
right: 0;\n right: 0;\n
}\n }\n
/* fix controlgroups in header font-size */\n
.ui-header .ui-controlgroup.ui-btn-left, \n
.ui-header .ui-controlgroup.ui-btn-right {\n
font-size: auto;\n
}\n
/* double borders */\n /* double borders */\n
html .ui-header .ui-btn-left.ui-btn,\n html .ui-header .ui-btn-left.ui-btn,\n
html .ui-header .ui-btn-left .ui-btn {\n html .ui-header .ui-btn-left .ui-btn {\n
...@@ -953,11 +964,6 @@ html .ui-btn, label.ui-btn {\n ...@@ -953,11 +964,6 @@ html .ui-btn, label.ui-btn {\n
.ui-btn-icon-notext:after {\n .ui-btn-icon-notext:after {\n
text-indent: 0;\n text-indent: 0;\n
}\n }\n
/* fix font-size on notext buttons, so icons don\'t zoom, JQMs-px font-size */\n
.ui-header .ui-btn-icon-notext,\n
.ui-footer .ui-btn-icon-notext {\n
font-size: 12.5px;\n
}\n
\n \n
/* ---------------------------- TABLE ------------------------------------ */\n /* ---------------------------- TABLE ------------------------------------ */\n
/* NOTE: since the table widget is not used, JQM CSS is added hard coded */\n /* NOTE: since the table widget is not used, JQM CSS is added hard coded */\n
...@@ -1460,7 +1466,7 @@ html.ui-mobile body nav.ui-title {\n ...@@ -1460,7 +1466,7 @@ html.ui-mobile body nav.ui-title {\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>936.46336.62391.44851</string> </value> <value> <string>936.47424.46819.23074</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -1478,7 +1484,7 @@ html.ui-mobile body nav.ui-title {\n ...@@ -1478,7 +1484,7 @@ html.ui-mobile body nav.ui-title {\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1407335558.98</float> <float>1407398552.06</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -142,7 +142,13 @@ ...@@ -142,7 +142,13 @@
data-gadget-sandbox="public"></div>\n data-gadget-sandbox="public"></div>\n
</div>\n </div>\n
\n \n
<a href="#" class="responsive ui-btn ui-icon-home ui-btn-icon-left">Home</a>\n <div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right">\n
<div class="ui-controlgroup-controls">\n
<a class="responsive ui-btn ui-icon-plus ui-btn-icon-left ui-disabled" role="button" data-role="button">New</a>\n
<a role="button" data-role="button" href="#" class="responsive ui-btn ui-icon-home ui-btn-icon-left">Home</a>\n
</div>\n
</div>\n
\n
</header>\n </header>\n
\n \n
<article></article>\n <article></article>\n
...@@ -276,7 +282,7 @@ ...@@ -276,7 +282,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>sven</string> </value> <value> <string>romain</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -290,7 +296,7 @@ ...@@ -290,7 +296,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>936.46013.38940.47974</string> </value> <value> <string>936.47410.50555.22340</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -308,7 +314,7 @@ ...@@ -308,7 +314,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1407314211.01</float> <float>1407397647.36</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -205,10 +205,29 @@ ...@@ -205,10 +205,29 @@
})\n })\n
\n \n
.push(function (form_gadget) {\n .push(function (form_gadget) {\n
\n
var new_content_action = sub_options.erp5_document._links.action_object_new_content_action,\n
plus_queue;\n
if (new_content_action === undefined) {\n
var new_element = gadget.__element.querySelector(".ui-icon-plus");\n
new_element.href = "";\n
if (!new_element.classList.contains("ui-disabled")) {\n
new_element.classList.add("ui-disabled");\n
}\n
} else {\n
// XXX copied from whoWantToDisplayThisPage\n
plus_queue = gadget.aq_pleasePublishMyState({jio_key: gadget.props.jio_key, view: new_content_action.name})\n
.push(function (hash) {\n
var new_element = gadget.__element.querySelector(".ui-icon-plus");\n
new_element.href = hash;\n
new_element.classList.remove("ui-disabled");\n
});\n
}\n
return RSVP.all([\n return RSVP.all([\n
form_gadget.render(sub_options),\n form_gadget.render(sub_options),\n
form_gadget.getElement(),\n form_gadget.getElement(),\n
gadget.props.breadcrumb_gadget.render(breadcrumb_options)\n gadget.props.breadcrumb_gadget.render(breadcrumb_options),\n
plus_queue\n
]);\n ]);\n
})\n })\n
}\n }\n
...@@ -325,6 +344,13 @@ ...@@ -325,6 +344,13 @@
queue;\n queue;\n
\n \n
if (options.jio_key === undefined) {\n if (options.jio_key === undefined) {\n
\n
var new_element = gadget.__element.querySelector(".ui-icon-plus");\n
new_element.href = "";\n
if (!new_element.classList.contains("ui-disabled")) {\n
new_element.classList.add("ui-disabled");\n
}\n
\n
if (options.page === "login") {\n if (options.page === "login") {\n
queue = renderLoginForm(gadget, options);\n queue = renderLoginForm(gadget, options);\n
} else if (options.page === undefined) {\n } else if (options.page === undefined) {\n
...@@ -515,7 +541,7 @@ ...@@ -515,7 +541,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>936.45060.38036.50312</string> </value> <value> <string>936.47421.11609.45107</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -533,7 +559,7 @@ ...@@ -533,7 +559,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1407311956.87</float> <float>1407398340.29</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
39 40
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment