Add controls to cancel / confirm search selection
This refs 32826
This commit is contained in:
parent
ba1d9cd185
commit
463d140eb0
|
@ -22,6 +22,14 @@ msgstr "Ajouter"
|
|||
msgid "Add Collection Portlet"
|
||||
msgstr "Ajouter un portlet de collection"
|
||||
|
||||
#: ../templates/view_form.pt:23
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
|
||||
#: ../templates/view_form.pt:26
|
||||
msgid "Confirm"
|
||||
msgstr "Confirmer"
|
||||
|
||||
#: ../searchview.py:372
|
||||
msgid "Creation Date"
|
||||
msgstr "Date de création"
|
||||
|
|
|
@ -25,6 +25,14 @@ msgstr ""
|
|||
msgid "Add Collection Portlet"
|
||||
msgstr ""
|
||||
|
||||
#: ../templates/view_form.pt:23
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: ../templates/view_form.pt:26
|
||||
msgid "Confirm"
|
||||
msgstr ""
|
||||
|
||||
#: ../searchview.py:372
|
||||
msgid "Creation Date"
|
||||
msgstr ""
|
||||
|
|
|
@ -128,3 +128,15 @@ a.batch-link.current {
|
|||
#form-widgets-sort_reversed-0 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#iframe-controls {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#iframe-controls input[type=submit] {
|
||||
height: 2em;
|
||||
font-size: 1.2em;
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0.5em;
|
||||
margin: 1em 0.5em 0em 0.5em;
|
||||
}
|
||||
|
|
|
@ -521,4 +521,13 @@ function select_metatype(elem)
|
|||
$(this).find('select:disabled').enable();
|
||||
});
|
||||
|
||||
$('#confirm-overlay').click(function() {
|
||||
$('div.close', window.parent.document).click();
|
||||
});
|
||||
$('#cancel-overlay').click(function() {
|
||||
$('#searchresults input:checkbox').removeAttr('checked');
|
||||
$('#searchresults tr').removeClass('selected');
|
||||
$('div.close', window.parent.document).click();
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
|
|
|
@ -17,5 +17,16 @@
|
|||
|
||||
<div id="searchresults"/>
|
||||
|
||||
<div id="iframe-controls"
|
||||
tal:condition="request/iframe | nothing"
|
||||
i18n:domain="pfwbged.collection">
|
||||
<input id="cancel-overlay" class="allowMultiSubmit" type="submit"
|
||||
value="Cancel"
|
||||
i18n:attributes="value" />
|
||||
<input id="confirm-overlay" class="allowMultiSubmit" type="submit"
|
||||
value="Confirm"
|
||||
i18n:attributes="value" />
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -50,6 +50,6 @@ class PFWBRelatedDocsWidget(RelatedDocsWidget):
|
|||
$(this).after(" ");
|
||||
});
|
||||
|
||||
""" % dict(search_url=api.portal.get().absolute_url() + '/pfwbsearch?iframe',
|
||||
""" % dict(search_url=api.portal.get().absolute_url() + '/pfwbsearch?iframe=1',
|
||||
id=self.name.replace('.', '-'),
|
||||
anchor_text=translate(_(u'Add'), context=self.request))
|
||||
|
|
Reference in New Issue