Minor fixes to statement, services and internal things

Many misc updates
This commit is contained in:
Deon George
2011-10-14 16:44:12 +11:00
parent 7876a16413
commit 56c11507f4
71 changed files with 2192 additions and 677 deletions

View File

@@ -126,7 +126,7 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template {
foreach (array('file'=>array(
'js/jquery.cookie.js',
'js/jquery.jstree-1.0rc3.js',
'js/jquery-1.4.2.js',
'js/jquery-1.6.4.min.js',
)) as $type => $datas) {
foreach ($datas as $data) {

View File

@@ -18,7 +18,7 @@ class Controller_lnApp_Tree extends Controller_Default {
public function after() {
$this->response->headers('Content-Type','application/json');
$this->response->body(sprintf('[%s]',json_encode($this->output)));
$this->response->body(json_encode($this->output));
parent::after();
}
@@ -29,6 +29,7 @@ class Controller_lnApp_Tree extends Controller_Default {
return '
<div id="tree" class=""></div>
<script type="text/javascript">
<!--
$(function () {
$("#tree").jstree({
themes : {
@@ -40,6 +41,7 @@ $(function () {
},
cookies : {
"save_selected" : false,
"cookie_options" : { path : "'.URL::site().'" }
},
json_data : {
"correct_state" : "true",
@@ -60,7 +62,7 @@ $(function () {
id = data.rslt.obj.attr(\'id\').substr(a+1);
if (href = $("#N_"+id).attr("href")) {
$("#ajBODY").empty().html("<img src=\"'.URL::site('media/img/ajax-progress.gif').'\"/>");
$("#ajBODY").empty().html("<img src=\"'.URL::site('media/img/ajax-progress.gif').'\" alt=\"Loading...\" />");
$("#ajBODY").load(href, function(r,s,x) {
if (s == "error") {
var msg = "Sorry but there was an error: ";
@@ -72,6 +74,7 @@ $(function () {
}
});
});
// -->
</script>';
}