Project

General

Profile

« Previous | Next » 

Revision 677

Added by thorn almost 17 years ago

jsadmin: added latest changes from swen, fixes most (or all?) issues.

View differences:

trunk/CHANGELOG
10 10
# = Bugfix
11 11
! = Update/Change
12 12

  
13
------------------------------------- 2.7.0 -------------------------------------
13
------------------------------------- 2.7.0 -------------------------------------
14
09-Feb-2008
15
!	jsadmin: added latest changes from swen, fixes most (or all?) issues.
14 16
08-Feb-2008 Matthias Gallas
15 17
+	added kewyword id to all new files
16 18
08-Feb-2008 Christian Sommer
trunk/wb/modules/jsadmin/uninstall.php
32 32
// prevent this file from being accessed directly
33 33
if(!defined('WB_PATH')) { exit('Cannot access this file directly'); }
34 34

  
35
// delete the rows from the addons table
36
$table = TABLE_PREFIX .'addons';
37
$database->query("DELETE FROM `".$table."` WHERE `".$table."`.`name` ='Javascript Admin' LIMIT 1 ");
38

  
39
// delete the rows from the settings table
40
$table = TABLE_PREFIX .'settings';
41
$database->query("DELETE FROM `".$table."` WHERE `".$table."`.`name` ='mod_jsadmin_persist_order' LIMIT 1 ");
42
$database->query("DELETE FROM `".$table."` WHERE `".$table."`.`name` ='mod_jsadmin_ajax_order_pages' LIMIT 1 ");
43
$database->query("DELETE FROM `".$table."` WHERE `".$table."`.`name` ='mod_jsadmin_ajax_order_sections' LIMIT 1 ");
44

  
35
$table = TABLE_PREFIX ."mod_jsadmin";
36
$database->query("DROP TABLE `$table`");
45 37
?>
trunk/wb/modules/jsadmin/info.php
65 65
$module_directory 		= 'jsadmin';
66 66
$module_name 				= 'Javascript Admin';
67 67
$module_function 			= 'tool';
68
$module_version 			= '1.2';
69
$module_platform 			= '2.7';
68
$module_version 			= '1.2.1';
69
$module_platform 			= 'WB 2.7.x';
70 70
$module_author 			= 'Stepan Riha, Swen Uth';
71 71
$module_license 			= 'BSD License';
72 72
$module_description 		= 'This module adds Javascript functionality to the Website Baker Admin to improve some of the UI interactions. Uses the YahooUI library.';
trunk/wb/modules/jsadmin/jsadmin_backend_include.php
66 66
	} elseif($page_type == 'sections') {
67 67
		if(get_setting('mod_jsadmin_ajax_order_sections', '1')) {
68 68
			$js_scripts[] = 'dragdrop.js';
69
			$js_buttonCell= 4; // This ist the Cell where the Button "Up" is , by Swen Uth
69
			if(SECTION_BLOCKS) {
70
			$js_buttonCell= 4;}
71
      else{ $js_buttonCell= 3;} // This ist the Cell where the Button "Up" is , by Swen Uth
70 72
		}
71 73
	} elseif($page_type == 'config') {
72 74
		$js_scripts[] = 'tool.js';
trunk/wb/modules/jsadmin/jsadmin.php
31 31

  
32 32
function get_setting($name, $default = '') {
33 33
	global $database;
34
	$rs = $database->query("SELECT value FROM ".TABLE_PREFIX."settings WHERE name = '".$name."'");
34
	$rs = $database->query("SELECT value FROM ".TABLE_PREFIX."mod_jsadmin WHERE name = '".$name."'");
35 35
	if($row = $rs->fetchRow())
36 36
		return $row['value'];
37 37
	return
......
44 44
	$prev_value = get_setting($name, false);
45 45

  
46 46
	if($prev_value === false) {
47
		$database->query("INSERT INTO ".TABLE_PREFIX."settings (name,value) VALUES ('$name','$value')");
47
		$database->query("INSERT INTO ".TABLE_PREFIX."mod_jsadmin (name,value) VALUES ('$name','$value')");
48 48
	} else {
49
		$database->query("UPDATE ".TABLE_PREFIX."settings SET value = '$value' WHERE name = '$name'");
49
		$database->query("UPDATE ".TABLE_PREFIX."mod_jsadmin SET value = '$value' WHERE name = '$name'");
50 50
	}
51 51
}
52 52

  
trunk/wb/modules/jsadmin/install.php
33 33
if(!defined('WB_PATH')) { exit('Cannot access this file directly'); }
34 34

  
35 35
// add new rows to table "settings"
36

  
37
$table = TABLE_PREFIX ."mod_jsadmin";
38
$database->query("DROP TABLE IF EXISTS `$table`");
39

  
40
$database->query("
41
	CREATE TABLE `$table` (
42
    `id` INT(11) NOT NULL DEFAULT '0',
43
		`name` VARCHAR(255) NOT NULL DEFAULT '0',
44
		`value` INT(11) NOT NULL DEFAULT '0',
45
   	PRIMARY KEY (`id`)
46
	)
47
");
48

  
36 49
global $database;
37
$database->query("INSERT INTO ".TABLE_PREFIX."settings (name,value) VALUES ('mod_jsadmin_persist_order','0')");
38
$database->query("INSERT INTO ".TABLE_PREFIX."settings (name,value) VALUES ('mod_jsadmin_ajax_order_pages','0')");
39
$database->query("INSERT INTO ".TABLE_PREFIX."settings (name,value) VALUES ('mod_jsadmin_ajax_order_sections','0')");
50
$database->query("INSERT INTO ".$table." (id,name,value) VALUES ('1','mod_jsadmin_persist_order','0')");
51
$database->query("INSERT INTO ".$table." (id,name,value) VALUES ('2','mod_jsadmin_ajax_order_pages','0')");
52
$database->query("INSERT INTO ".$table." (id,name,value) VALUES ('3','mod_jsadmin_ajax_order_sections','0')");
40 53

  
41 54
?>
trunk/wb/modules/jsadmin/move_to.php
29 29

  
30 30
*/
31 31

  
32
// prevent this file from being accessed directly
33
if(!defined('WB_PATH')) { exit('Cannot access this file directly'); }
32 34
require('../../config.php');
33 35

  
34
if(isset($_GET['page_id']) AND is_numeric($_GET['page_id']) AND is_numeric(@$_GET['position'])) {
36
 if(isset($_GET['page_id']) AND is_numeric($_GET['page_id']) AND is_numeric(@$_GET['position'])) {
35 37
	$position = $_GET['position'];
36 38

  
37 39
	// Get common fields

Also available in: Unified diff