Skip to content

Commit 21634cc

Browse files
committed
Scene widgets
* Scene widgets (early preview)
1 parent 10acc5b commit 21634cc

17 files changed

+584
-110
lines changed

js/scripts.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function simple_hash(s) {
5353

5454
function inIframe () {
5555
try {
56-
return window.self !== window.top;
56+
return (window.location !== window.parent.location);
5757
} catch (e) {
5858
return true;
5959
}

languages/default.php

+2
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,8 @@
14061406
'THEME_LIGHT' => 'Light',
14071407
'DATA_SOURCE' => 'Data source',
14081408
'WIDGET' => 'Widget',
1409+
'WIDGETS' => 'Widgets',
1410+
'ADD_WIDGET' => 'Add widget',
14091411
'PANE' => 'Pane',
14101412
'COLUMNS' => 'Columns',
14111413
'SIZE' => 'Size',

lib/module.class.php

+6-5
Original file line numberDiff line numberDiff line change
@@ -582,23 +582,25 @@ public function getSubModules()
582582
public function redirect($url)
583583
{
584584
global $session;
585-
global $db;
586585

587-
$url = $this->makeRealURL($url);
586+
$new_url = $this->makeRealURL($url);
587+
if (isset($this->owner) && $this->owner->name=='panel' && preg_match('/nf\.php/',$new_url)) {
588+
$new_url = str_replace('nf.php','admin.php',$new_url);
589+
}
588590

589591
$session->save();
590592

591593
if ($_GET['part_load']) {
592594
$res = array();
593595
$res['CONTENT'] = '';
594596
$res['NEED_RELOAD'] = 1;
595-
$res['REDIRECT'] = $url;
597+
$res['REDIRECT'] = $new_url;
596598
echo json_encode($res);
597599
exit;
598600
}
599601

600602
if (!headers_sent()) {
601-
header("Location: $url\n\n");
603+
header("Location: $new_url\n\n");
602604
} else {
603605
print "Headers already sent in $filename on line $linenum<br>\n" . "Cannot redirect instead\n";
604606
}
@@ -711,7 +713,6 @@ public function parseLinks($result)
711713
global $PHP_SELF;
712714
$_SERVER['PHP_SELF'] = $PHP_SELF;
713715
}
714-
715716
$param_str = '';
716717

717718
if ($md != $this->name) {

0 commit comments

Comments
 (0)