Commit 1b8afbb6 authored by Nigel McNie's avatar Nigel McNie
Browse files

Use the key 'javascript' instead of 'js' everywhere, for consistency with the...

Use the key 'javascript' instead of 'js' everywhere, for consistency with the vast majority of stuff we already have doing things this way (render_self)
parent 3ee2dc12
......@@ -289,7 +289,7 @@ class BlockInstance {
*
* @param bool $configure Whether to render the block instance in configure
* mode
* @return array Array with two keys: 'html' for raw html, 'js' for
* @return array Array with two keys: 'html' for raw html, 'javascript' for
* javascript to run
*/
public function render_editing($configure=false) {
......@@ -354,7 +354,7 @@ class BlockInstance {
$smarty->assign('javascript', defined('JSON'));
$smarty->assign('strnotitle', get_string('notitle', 'view'));
return array('html' => $smarty->fetch('view/blocktypecontainerediting.tpl'), 'js' => $js);
return array('html' => $smarty->fetch('view/blocktypecontainerediting.tpl'), 'javascript' => $js);
}
public function render_viewing() {
......@@ -382,7 +382,7 @@ class BlockInstance {
/**
* Builds the configuration pieform for this blockinstance
*
* @return array Array with two keys: 'html' for raw html, 'js' for
* @return array Array with two keys: 'html' for raw html, 'javascript' for
* javascript to run
*/
public function build_configure_form() {
......@@ -455,7 +455,7 @@ class BlockInstance {
}
}
return array('html' => $html, 'js' => $js);
return array('html' => $html, 'javascript' => $js);
}
public function commit() {
......
......@@ -284,7 +284,7 @@ function ViewManager() {
'button' : button
};
contentDiv.innerHTML = data.data['html'];
eval(data.data.js);
eval(data.data.javascript);
// Make the cancel button be supersmart
var cancelButton = $('cancel_cb_' + blockinstanceId + '_action_configureblockinstance_id_' + blockinstanceId);
......@@ -852,7 +852,7 @@ function ViewManager() {
self.makeBlockinstanceDraggable(blockinstance);
insertSiblingNodesAfter(self.blockPlaceholder, blockinstance);
removeElement(self.blockPlaceholder);
eval(data.data.js);
eval(data.data.javascript);
});
......
......@@ -50,7 +50,7 @@ function pieform_element_artefactchooser(Pieform $form, $element) {
// Save the pagination javascript for later, when it is asked for. This is
// messy, but can't be helped until Pieforms goes to a more OO way of
// managing stuff.
$pagination_js = $pagination['js'];
$pagination_js = $pagination['javascript'];
return $smarty->fetch('form/artefactchooser.tpl');
}
......
......@@ -2087,7 +2087,7 @@ function build_pagination($params) {
// Close the container div
$output .= '</div>';
return array('html' => $output, 'js' => $js);
return array('html' => $output, 'javascript' => $js);
}
......
......@@ -44,7 +44,7 @@ json_reply(false, array(
'data' => array(
'tablerows' => $html,
'pagination' => $pagination['html'],
'pagination_js' => $pagination['js'],
'pagination_js' => $pagination['javascript'],
'count' => $count
)
));
......
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