more asset manager changes
This commit is contained in:
parent
9d5353cf8f
commit
95bac10986
15 changed files with 247 additions and 99 deletions
|
|
@ -182,7 +182,7 @@ create table ImageAsset (
|
|||
thumbnailSize int not null default 50
|
||||
);
|
||||
|
||||
INSERT INTO template VALUES ('1','Admin Console','^StyleSheet(^Extras;/adminConsole/adminConsole.css);\r\n^JavaScript(^Extras;/adminConsole/adminConsole.js);\r\n\r\n<div id=\"application_help\">\r\n <tmpl_if help.url>\r\n <a href=\"<tmpl_var help.url>\" target=\"_blank\"><img src=\"^Extras;/adminConsole/small/help.gif\" alt=\"?\" border=\"0\" /></a>\r\n </tmpl_if>\r\n</div>\r\n<div id=\"application_icon\">\r\n <img src=\"<tmpl_var application.icon>\" border=\"0\" title=\"<tmpl_var application.title>\" alt=\"<tmpl_var application.title>\" />\r\n</div>\r\n<div class=\"adminConsoleTitleIconMedalian\">\r\n<img src=\"^Extras;/adminConsole/medalian.gif\" border=\"0\" alt=\"*\" />\r\n</div>\r\n<div id=\"console_icon\">\r\n <img src=\"<tmpl_var console.icon>\" border=\"0\" title=\"<tmpl_var console.title>\" alt=\"<tmpl_var console.title>\" />\r\n</div>\r\n<div id=\"application_title\">\r\n <tmpl_var application.title>\r\n</div>\r\n<div id=\"console_title\">\r\n <tmpl_var console.title>\r\n</div>\r\n<div id=\"application_workarea\">\r\n <tmpl_var application.workArea>\r\n</div>\r\n<div id=\"console_workarea\">\r\n <div class=\"adminConsoleSpacer\">\r\n \r\n </div>\r\n <tmpl_loop application_loop>\r\n <tmpl_if canUse>\r\n <div class=\"adminConsoleApplication\">\r\n <a href=\"<tmpl_var url>\"><img src=\"<tmpl_var icon>\" border=\"0\" title=\"<tmpl_var title>\" alt=\"<tmpl_var title>\" /></a><br />\r\n <a href=\"<tmpl_var url>\"><tmpl_var title></a>\r\n </div>\r\n </tmpl_if>\r\n </tmpl_loop>\r\n <div class=\"adminConsoleSpacer\">\r\n \r\n </div>\r\n</div>\r\n<div class=\"adminConsoleMenu\">\r\n <div id=\"adminConsoleMainMenu\" class=\"adminConsoleMainMenu\">\r\n <div id=\"console_toggle_on\">\r\n <a href=\"#\" onClick=\"toggleAdminConsole()\"><tmpl_var toggle.on.label></a><br />\r\n </div>\r\n <div id=\"console_toggle_off\">\r\n <a href=\"#\" onClick=\"toggleAdminConsole()\"><tmpl_var toggle.off.label></a><br />\r\n </div>\r\n </div>\r\n <div id=\"adminConsoleApplicationSubmenu\" class=\"adminConsoleApplicationSubmenu\">\r\n <tmpl_loop submenu_loop>\r\n <a href=\"<tmpl_var url>\"><tmpl_var label></a><br />\r\n </tmpl_loop>\r\n </div>\r\n <div id=\"adminConsoleUtilityMenu\" class=\"adminConsoleUtilityMenu\">\r\n <a href=\"^;\"><tmpl_var backtosite.label></a><br />\r\n ^AdminToggle;<br />\r\n ^LoginToggle;<br />\r\n </div>\r\n</div>\r\n<script lang=\"JavaScript\">\r\n initAdminConsole(<tmpl_if application.title>true<tmpl_else>false</tmpl_if>,<tmpl_if submenu_loop>true<tmpl_else>false</tmpl_if>);\r\n</script>\r\n','AdminConsole',1,1);
|
||||
INSERT INTO template VALUES ('1','Admin Console','^StyleSheet(^Extras;/adminConsole/adminConsole.css);\r\n^JavaScript(^Extras;/adminConsole/adminConsole.js);\r\n\r\n<div id=\"application_help\">\r\n <tmpl_if help.url>\r\n <a href=\"<tmpl_var help.url>\" target=\"_blank\"><img src=\"^Extras;/adminConsole/small/help.gif\" alt=\"?\" border=\"0\" /></a>\r\n </tmpl_if>\r\n</div>\r\n<div id=\"application_icon\">\r\n <img src=\"<tmpl_var application.icon>\" border=\"0\" title=\"<tmpl_var application.title>\" alt=\"<tmpl_var application.title>\" />\r\n</div>\r\n<div class=\"adminConsoleTitleIconMedalian\">\r\n<img src=\"^Extras;/adminConsole/medalian.gif\" border=\"0\" alt=\"*\" />\r\n</div>\r\n<div id=\"console_icon\">\r\n <img src=\"<tmpl_var console.icon>\" border=\"0\" title=\"<tmpl_var console.title>\" alt=\"<tmpl_var console.title>\" />\r\n</div>\r\n<div id=\"application_title\">\r\n <tmpl_var application.title>\r\n</div>\r\n<div id=\"console_title\">\r\n <tmpl_var console.title>\r\n</div>\r\n<div id=\"application_workarea\">\r\n <tmpl_var application.workArea>\r\n</div>\r\n<div id=\"console_workarea\">\r\n <div class=\"adminConsoleSpacer\">\r\n \r\n </div>\r\n <tmpl_loop application_loop>\r\n <tmpl_if canUse>\r\n <div class=\"adminConsoleApplication\">\r\n <a href=\"<tmpl_var url>\"><img src=\"<tmpl_var icon>\" border=\"0\" title=\"<tmpl_var title>\" alt=\"<tmpl_var title>\" /></a><br />\r\n <a href=\"<tmpl_var url>\"><tmpl_var title></a>\r\n </div>\r\n </tmpl_if>\r\n </tmpl_loop>\r\n <div class=\"adminConsoleSpacer\">\r\n \r\n </div>\r\n</div>\r\n<div class=\"adminConsoleMenu\">\r\n <div id=\"adminConsoleMainMenu\" class=\"adminConsoleMainMenu\">\r\n <div id=\"console_toggle_on\">\r\n <a href=\"#\" onClick=\"toggleAdminConsole()\"><tmpl_var toggle.on.label></a><br />\r\n </div>\r\n <div id=\"console_toggle_off\">\r\n <a href=\"#\" onClick=\"toggleAdminConsole()\"><tmpl_var toggle.off.label></a><br />\r\n </div>\r\n </div>\r\n <div id=\"adminConsoleApplicationSubmenu\" class=\"adminConsoleApplicationSubmenu\">\r\n <tmpl_loop submenu_loop>\r\n <a href=\"<tmpl_var url>\"><tmpl_var label></a><br />\r\n </tmpl_loop>\r\n </div>\r\n <div id=\"adminConsoleUtilityMenu\" class=\"adminConsoleUtilityMenu\">\r\n <a href=\"^\;\"><tmpl_var backtosite.label></a><br />\r\n ^AdminToggle;<br />\r\n ^LoginToggle;<br />\r\n </div>\r\n</div>\r\n<script lang=\"JavaScript\">\r\n initAdminConsole(<tmpl_if application.title>true<tmpl_else>false</tmpl_if>,<tmpl_if submenu_loop>true<tmpl_else>false</tmpl_if>);\r\n</script>\r\n','AdminConsole',1,1);
|
||||
insert into settings (name,value) values ('AdminConsoleTemplate',1);
|
||||
delete from template where namespace='Macro/AdminBar' and templateId in ('1','2');
|
||||
INSERT INTO template VALUES ('1','Default Admin Bar','<script language=\"JavaScript\" type=\"text/javascript\"> <!--\r\n function goContent(){\r\n location = document.content.contentSelect.options[document.content.contentSelect.selectedIndex].value\r\n }\r\n function goAdmin(){\r\n location = document.admin.adminSelect.options[document.admin.adminSelect.selectedIndex].value\r\n }\r\n //--> </script>\r\n \r\n<div class=\"adminBar\">\r\n<table class=\"adminBar\" cellpadding=\"3\" cellspacing=\"0\" border=\"0\">\r\n <tr>\r\n <form name=\"content\"> <td>\r\n<select name=\"contentSelect\" onChange=\"goContent()\">\r\n<option value=\"\"><tmpl_var addcontent.label></option>\r\n\r\n<tmpl_if clipboard_loop>\r\n<optgroup label=\"<tmpl_var clipboard.label>\"> \r\n<tmpl_loop clipboard_loop>\r\n<option value=\"<tmpl_var clipboard.url>\"><tmpl_var clipboard.label></option>\r\n</tmpl_loop>\r\n</optgroup>\r\n</tmpl_if>\r\n\r\n<tmpl_if contentTypes_loop>\r\n<optgroup label=\"<tmpl_var contentTypes.label>\"> \r\n<tmpl_loop contentTypes_loop>\r\n<option value=\"<tmpl_var contentType.url>\"><tmpl_var contentType.label></option>\r\n</tmpl_loop>\r\n</optgroup>\r\n</tmpl_if>\r\n\r\n<tmpl_if package_loop>\r\n<optgroup label=\"<tmpl_var packages.label>\"> \r\n<tmpl_loop package_loop>\r\n<option value=\"<tmpl_var package.url>\"><tmpl_var package.label></option>\r\n</tmpl_loop>\r\n</optgroup>\r\n</tmpl_if>\r\n\r\n</select>\r\n </td> </form>\r\n\r\n <form name=\"admin\"> <td align=\"center\">\r\n <select name=\"adminSelect\" onChange=\"goAdmin()\">\r\n <option value=\"\"><tmpl_var admin.label></option>\r\n <tmpl_loop admin_loop>\r\n <option value=\"<tmpl_var admin.url>\"><tmpl_var admin.label></option>\r\n </tmpl_loop>\r\n </select>\r\n </td> </form>\r\n </tr>\r\n</table>\r\n</div>\r\n','Macro/AdminBar',1,1);
|
||||
|
|
|
|||
|
|
@ -98,13 +98,14 @@ sub getEditForm {
|
|||
my $self = shift;
|
||||
my $tabform = $self->SUPER::getEditForm();
|
||||
if ($self->get("filename") ne "") {
|
||||
my $storage = WebGUI::Storage->new($self->get("storageId"));
|
||||
my $storage = WebGUI::Storage->get($self->get("storageId"));
|
||||
|
||||
}
|
||||
$tabform->getTab("properties")->url(
|
||||
$tabform->getTab("properties")->file(
|
||||
-name=>"file",
|
||||
-label=>"File To Upload"
|
||||
);
|
||||
return $tabform;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -113,7 +114,7 @@ sub getIcon {
|
|||
my $self = shift;
|
||||
my $small = shift;
|
||||
if ($small) {
|
||||
my $storage = WebGUI::Storage->new($self->get("storageId"));
|
||||
my $storage = WebGUI::Storage->get($self->get("storageId"));
|
||||
return $storage->getFileIconUrl($self->get("filename"));
|
||||
}
|
||||
return $session{config}{extrasURL}.'/assets/file.gif';
|
||||
|
|
@ -144,15 +145,25 @@ sub purge {
|
|||
my @old = split("\n",$self->get("olderVersions"));
|
||||
foreach my $oldone (@old) {
|
||||
my ($storageId, $filename) = split("|",$oldone);
|
||||
my $storage = WebGUI::Storage->new($storageId);
|
||||
my $storage = WebGUI::Storage->get($storageId);
|
||||
$storage->delete;
|
||||
}
|
||||
my $storage = WebGUI::Storage->new($self->get("storageId"));
|
||||
my $storage = WebGUI::Storage->get($self->get("storageId"));
|
||||
$storage->delete;
|
||||
return $self->SUPER::purge;
|
||||
}
|
||||
|
||||
|
||||
sub view {
|
||||
my $self = shift;
|
||||
if ($session{var}{adminOn}) {
|
||||
return $self->www_edit;
|
||||
}
|
||||
my $storage = WebGUI::Storage->get($self->get("storageId"));
|
||||
WebGUI::HTTP::setRedirect($storage->getUrl($self->get("filename")));
|
||||
return "";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_editSave
|
||||
|
|
@ -185,24 +196,11 @@ sub www_editSave {
|
|||
return $output;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_view
|
||||
|
||||
A web executable method that redirects the user to the specified page, or displays the edit interface when admin mode is enabled.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_view {
|
||||
my $self = shift;
|
||||
if ($session{var}{adminOn}) {
|
||||
return $self->www_edit;
|
||||
}
|
||||
my $storage = WebGUI::Storage->new($self->get("storageId"));
|
||||
WebGUI::HTTP::setRedirect($storage->getUrl($self->get("filename")));
|
||||
return "";
|
||||
}
|
||||
#sub www_view {
|
||||
# my $self = shift;
|
||||
# return WebGUI::Privilege::noAccess() unless $self->canView;
|
||||
# return $self->view;
|
||||
#}
|
||||
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@ sub getEditForm {
|
|||
-value=>'<img src="'.$storage->getUrl($self->get("filename")).'" alt="thumbnail" />'
|
||||
);
|
||||
}
|
||||
return $tabform;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ sub getFileIconUrl {
|
|||
if (-f $path) {
|
||||
return $session{config}{extrasURL}."/fileIcons/".$extension.".gif";
|
||||
}
|
||||
return $session{config}{extrasURL}."/fileIcons/unkonwn.gif";
|
||||
return $session{config}{extrasURL}."/fileIcons/unknown.gif";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ use Tie::IxHash;
|
|||
use WebGUI::Form;
|
||||
use WebGUI::HTMLForm;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Style;
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
|
@ -214,11 +215,9 @@ Returns an HTML string with all the necessary components to draw the tab form.
|
|||
|
||||
sub print {
|
||||
my $self = shift;
|
||||
my $output = '
|
||||
<script src="'.$session{config}{extrasURL}.'/tabs/tabs.js" type="text/javascript"></script>
|
||||
<link href="'.$self->{_css}.'" rel="stylesheet" rev="stylesheet" type="text/css">
|
||||
';
|
||||
$output .= $self->{_form};
|
||||
WebGUI::Style::setScript($session{config}{extrasURL}.'/tabs/tabs.js',{type=>"text/javascript"});
|
||||
WebGUI::Style::setLink($self->{_css},{rel=>"stylesheet", rev=>"stylesheet",type=>"text/css"});
|
||||
my $output = $self->{_form};
|
||||
$output .= $self->{_hidden};
|
||||
my $i = 1;
|
||||
my $tabs;
|
||||
|
|
|
|||
|
|
@ -17,8 +17,9 @@ function Asset() {
|
|||
//methods
|
||||
this.edit = Asset_edit;
|
||||
this.view = Asset_view;
|
||||
this.go = Asset_go;
|
||||
this.setRank = Asset_setRank;
|
||||
this.displayProperties = Asset_displayProperties;
|
||||
// this.displayProperties = Asset_displayProperties;
|
||||
this.setParent = Asset_setParent;
|
||||
}
|
||||
|
||||
|
|
@ -49,6 +50,14 @@ function Asset_edit() {
|
|||
location.href = "http://" + manager.tools.getHostName(location.href) + manager.tools.addParamDelimiter(this.url) + "func=edit&afterEdit=assetManager";
|
||||
}
|
||||
|
||||
//Edit the properties of an asset (edit)
|
||||
//-------------------------------
|
||||
//url + ?||& + func=edit
|
||||
function Asset_go() {
|
||||
location.href = "http://" + manager.tools.getHostName(location.href) + manager.tools.addParamDelimiter(this.url) + "func=manageAssets";
|
||||
}
|
||||
|
||||
|
||||
//View an asset (view)
|
||||
//-------------
|
||||
//url + ?||& + func=view
|
||||
|
|
@ -56,16 +65,16 @@ function Asset_view() {
|
|||
location.href = "http://" + manager.tools.getHostName(location.href) + this.url;
|
||||
}
|
||||
|
||||
function Asset_displayProperties() {
|
||||
html = "<table border='0'><tr><td class=\"propertiesMenuName\">Title:</td><td class=\"propertiesMenuValue\">" + this.title + "</td></tr>";
|
||||
html+="<tr><td class=\"propertiesMenuName\">Rank:</td><td class=\"propertiesMenuValue\">" + this.rank + "</td></tr>"
|
||||
html+="<tr><td class=\"propertiesMenuName\">Asset ID:</td><td class=\"propertiesMenuValue\">" + this.assetId + "</td></tr>"
|
||||
html+="<tr><td class=\"propertiesMenuName\">Asset Type:</td><td class=\"propertiesMenuValue\">" + this.type + "</td></tr>"
|
||||
html+="<tr><td class=\"propertiesMenuName\">Size:</td><td class=\"propertiesMenuValue\">" + this.size + "</td></tr>"
|
||||
html+="<tr><td class=\"propertiesMenuName\">Last Updated:</td><td class=\"propertiesMenuValue\">" + this.lastUpdate + "</td></tr>"
|
||||
html+="</table>";
|
||||
manager.display.displayPropertiesWindow(html);
|
||||
}
|
||||
//function Asset_displayProperties() {
|
||||
// html = "<table border='0'><tr><td class=\"propertiesMenuName\">Title:</td><td class=\"propertiesMenuValue\">" + this.title + "</td></tr>";
|
||||
// html+="<tr><td class=\"propertiesMenuName\">Rank:</td><td class=\"propertiesMenuValue\">" + this.rank + "</td></tr>"
|
||||
// html+="<tr><td class=\"propertiesMenuName\">Asset ID:</td><td class=\"propertiesMenuValue\">" + this.assetId + "</td></tr>"
|
||||
// html+="<tr><td class=\"propertiesMenuName\">Asset Type:</td><td class=\"propertiesMenuValue\">" + this.type + "</td></tr>"
|
||||
// html+="<tr><td class=\"propertiesMenuName\">Size:</td><td class=\"propertiesMenuValue\">" + this.size + "</td></tr>"
|
||||
// html+="<tr><td class=\"propertiesMenuName\">Last Updated:</td><td class=\"propertiesMenuValue\">" + this.lastUpdate + "</td></tr>"
|
||||
// html+="</table>";
|
||||
// manager.display.displayPropertiesWindow(html);
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ function AssetManager_getManager() {
|
|||
function AssetManager_renderAssets() {
|
||||
|
||||
|
||||
var gridStr = '<table border="1" id="am_grid" class="am-grid"><tbody id="am_grid_body"><tr id="am_grid.headers" class="am-grid-header">';
|
||||
var gridStr = '<table border="0" cellspacing="0" id="am_grid" class="am-grid"><tbody id="am_grid_body"><tr id="am_grid.headers" class="am-grid-headers">';
|
||||
var eventStr='';
|
||||
var id = "";
|
||||
|
||||
|
|
@ -107,14 +107,14 @@ function AssetManager_renderAssets() {
|
|||
|
||||
function AssetManager_buildCrumbTrail() {
|
||||
var crumbtrail = document.getElementById("crumbtrail");
|
||||
var contents = "<table><tr>";
|
||||
var contents = '<table><tr>';
|
||||
|
||||
var parentAssets = new Array();
|
||||
|
||||
for (i=0;i<this.crumbtrail.length;i++) {
|
||||
contents += '<td id="' + this.crumbtrail[i][0] + '" class="crumbtrail">' + this.crumbtrail[i][2] + '</td>';
|
||||
contents += '<td id="' + this.crumbtrail[i][0] + '" class="am-crumbtrail">' + this.crumbtrail[i][2] + '</td>';
|
||||
if (i != this.crumbtrail.length -1) {
|
||||
contents += "<td> -> </td>";
|
||||
contents += "<td> / </td>";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -155,28 +155,30 @@ function AssetManager_getAsset(obj) {
|
|||
return obj.asset;
|
||||
}
|
||||
|
||||
function AssetManager_displayContextMenu(x,y) {
|
||||
function AssetManager_displayContextMenu(x,y,asset) {
|
||||
|
||||
var arr = new Array();
|
||||
|
||||
if (this.display.overObjects.length == 1) {
|
||||
arr[arr.length] = new ContextMenuItem(this.labels["go"],"javascript:manager.display.contextMenu.owner.go()");
|
||||
arr[arr.length] = new ContextMenuItem("<img src='/extras/assetManager/breakerLine.gif'>","");
|
||||
arr[arr.length] = new ContextMenuItem(this.labels["view"],"javascript:manager.display.contextMenu.owner.view()");
|
||||
arr[arr.length] = new ContextMenuItem(this.labels["edit"],"javascript:manager.display.contextMenu.owner.edit()");
|
||||
}
|
||||
|
||||
arr[arr.length] = new ContextMenuItem(this.labels["delete"],"javascript:manager.remove()");
|
||||
arr[arr.length] = new ContextMenuItem("<img src='/extras/assetManager/breakerLine.gif'>","");
|
||||
arr[arr.length] = new ContextMenuItem(this.labels["cut"],"javascript:AssetManager_getManager().cut()");
|
||||
arr[arr.length] = new ContextMenuItem(this.labels["copy"],"javascript:manager.copy()");
|
||||
if (!asset.isParent) {
|
||||
arr[arr.length] = new ContextMenuItem(this.labels["delete"],"javascript:manager.remove()");
|
||||
arr[arr.length] = new ContextMenuItem("<img src='/extras/assetManager/breakerLine.gif'>","");
|
||||
arr[arr.length] = new ContextMenuItem(this.labels["cut"],"javascript:AssetManager_getManager().cut()");
|
||||
arr[arr.length] = new ContextMenuItem(this.labels["copy"],"javascript:manager.copy()");
|
||||
|
||||
if (this.display.overObjects.length ==1) {
|
||||
arr[arr.length] = new ContextMenuItem("<img src='/extras/assetManager/breakerLine.gif'>","");
|
||||
arr[arr.length] = new ContextMenuItem(this.labels["editTree"],"javascript:manager.editTree()");
|
||||
arr[arr.length] = new ContextMenuItem(this.labels["properties"],"javascript:manager.display.contextMenu.owner.displayProperties()");
|
||||
}
|
||||
// alert("x = " + x + " y= " + y);
|
||||
if (this.display.overObjects.length ==1) {
|
||||
arr[arr.length] = new ContextMenuItem("<img src='/extras/assetManager/breakerLine.gif'>","");
|
||||
arr[arr.length] = new ContextMenuItem(this.labels["editTree"],"javascript:manager.editTree()");
|
||||
}
|
||||
}
|
||||
|
||||
manager.contextMenu.render(arr,x,y,this);
|
||||
manager.contextMenu.render(arr,x,y,asset);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -240,11 +242,11 @@ function AssetManager_sortGrid(columnIndex) {
|
|||
|
||||
if (colHeader.sortOrder==">") {
|
||||
colHeader.sortOrder="<";
|
||||
document.getElementById('am_grid.headers.' + columnIndex).innerHTML = this.columnHeadings[columnIndex] + " (up)";
|
||||
document.getElementById('am_grid.headers.' + columnIndex).innerHTML = this.columnHeadings[columnIndex] + ' <img src="/extras/assetManager/up.gif" />';
|
||||
|
||||
}else {
|
||||
colHeader.sortOrder=">";
|
||||
document.getElementById('am_grid.headers.' + columnIndex).innerHTML = this.columnHeadings[columnIndex] + "(down)";
|
||||
document.getElementById('am_grid.headers.' + columnIndex).innerHTML = this.columnHeadings[columnIndex] + ' <img src="/extras/assetManager/down.gif" />';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -62,11 +62,14 @@ function ContextMenu_render(contextMenuItemArray,x,y,owner) {
|
|||
|
||||
|
||||
if (y > parseInt(this.contextMenu.offsetHeight)) {
|
||||
this.contextMenu.style.top = (y + document.body.scrollTop - this.contextMenu.offsetHeight -1) + "px";
|
||||
// this.contextMenu.style.top = (y + document.body.scrollTop - this.contextMenu.offsetHeight -1) + "px";
|
||||
this.contextMenu.style.top = (y + window.scrollY - this.contextMenu.offsetHeight -1) + "px";
|
||||
}else {
|
||||
this.contextMenu.style.top = (y + document.body.scrollTop + 3) + "px";
|
||||
// this.contextMenu.style.top = (y + document.body.scrollTop + 3) + "px";
|
||||
this.contextMenu.style.top = (y + window.scrollY + 3) + "px";
|
||||
}
|
||||
this.contextMenu.style.left= (x + document.body.scrollLeft) + "px";
|
||||
//this.contextMenu.style.left= (x + document.body.scrollLeft) + "px";
|
||||
this.contextMenu.style.left= (x + window.scrollX) + "px";
|
||||
|
||||
|
||||
manager.display.bringToFront(this.contextMenu);
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ function Display_selectAsset(asset) {
|
|||
// debug(this.overObjects.length);
|
||||
if (!this.controlKeyDown && !this.shiftKeyDown) {
|
||||
for (i=0;i<this.overObjects.length;i++) {
|
||||
this.overObjects[i].div.style.backgroundColor="white";
|
||||
this.overObjects[i].div.className="am-grid-row";
|
||||
}
|
||||
this.overObjects=new Array();
|
||||
}
|
||||
|
|
@ -176,7 +176,7 @@ function Display_selectAsset(asset) {
|
|||
|
||||
if (!this.isSelected(asset)) {
|
||||
this.overObjects[this.overObjects.length] = asset;
|
||||
asset.div.style.backgroundColor = "red";
|
||||
asset.div.className="am-grid-row-over";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -207,13 +207,16 @@ function Display_move(e){
|
|||
}
|
||||
|
||||
if (this.overObjects[0] != this.focusObjects[0]) {
|
||||
var act = this.spy(this.dom? e.pageX: (e.clientX + document.body.scrollLeft),this.dom? e.pageY: (e.clientY + document.body.scrollTop));
|
||||
//var act = this.spy(this.dom? e.pageX: (e.clientX + document.body.scrollLeft),this.dom? e.pageY: (e.clientY + document.body.scrollTop));
|
||||
var act = this.spy(this.dom? e.pageX: (e.clientX + window.scrollX),this.dom? e.pageY: (e.clientY + window.scrollY));
|
||||
document.getElementById("dragImage").style.display = "block";
|
||||
document.getElementById("dragImage").style.top = this.dom? (e.clientY+ 15 + document.body.scrollTop) + "px" : (event.clientY + 15) + "px";
|
||||
// document.getElementById("dragImage").style.top = this.dom? (e.clientY+ 15 + document.body.scrollTop) + "px" : (event.clientY + 15) + "px";
|
||||
document.getElementById("dragImage").style.top = this.dom? (e.clientY+ 15 + window.scrollY) + "px" : (event.clientY + 15) + "px";
|
||||
|
||||
// debug(document.body.scrollTop);
|
||||
//debug(window.scrollY);
|
||||
document.getElementById("dragImage").style.left = this.dom? (e.clientX + 5 + document.body.scrollTop) + "px" : (event.clientX + 5) + "px";
|
||||
//document.getElementById("dragImage").style.left = this.dom? (e.clientX + 5 + document.body.scrollTop) + "px" : (event.clientX + 5) + "px";
|
||||
document.getElementById("dragImage").style.left = this.dom? (e.clientX + 5 + window.scrollX) + "px" : (event.clientX + 5) + "px";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ function EventManager_assetDoubleClick(e) {
|
|||
var e=dom? e : event;
|
||||
var obj =dom? e.target : e.srcElement
|
||||
|
||||
AssetManager_getManager().getAsset(obj).edit();
|
||||
AssetManager_getManager().getAsset(obj).go();
|
||||
}
|
||||
|
||||
function EventManager_assetRightClick(e) {
|
||||
|
|
@ -55,7 +55,7 @@ function EventManager_assetRightClick(e) {
|
|||
var asset = manager.getAsset(obj);
|
||||
|
||||
manager.display.contextMenu.owner = asset;
|
||||
manager.displayContextMenu(e.clientX,e.clientY);
|
||||
manager.displayContextMenu(e.clientX,e.clientY,asset);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,30 +1,163 @@
|
|||
.am-grid {height: 100%; font: menu;}
|
||||
.am-grid-headers {background-color:blue}
|
||||
.am-grid-header-0 {width: 50px; background-color: threedlightshadow; cursor:move;}
|
||||
.am-grid-header-1 {width: 200px; cursor:move;}
|
||||
.am-grid-header-2 {cursor:move;}
|
||||
.am-grid-header-3 {cursor:move;}
|
||||
.am-grid-header-4 {cursor:move;}
|
||||
|
||||
.am-grid-row {}
|
||||
|
||||
.am-grid-col-0 {width: 50px; background-color: threedlightshadow; cursor:move;}
|
||||
.am-grid-col-1 {width: 200px; cursor:move;}
|
||||
.am-grid-col-2 {cursor:move;}
|
||||
.am-grid-col-3 {cursor:move;}
|
||||
.am-grid-col-4 {cursor:move;}
|
||||
|
||||
|
||||
|
||||
.contextMenu{position: absolute; top: 0; left:0; font-size: 12px; display:none; text-decoration: none; background-color:#F0F0F0; border-bottom: 3px groove #999999; border-top: 0px groove #999999; border-right: 3px groove #999999; border-left: 0px groove #999999;}
|
||||
.contextMenu A{ font-size: 12px; text-decoration: none;}
|
||||
.contextMenuTabOver{background-color: darkblue; text-decoration: none; width:100%; color: #ffffff; font-size: 12px;}
|
||||
.contextMenuTab, .contextMenuTab A{background-color: #F0F0F0; width:100%; text-decoration: none; font-size: 12px; color:#000000;}
|
||||
|
||||
.propertiesWindow{position:absolute; display:none; background-color:#F2F2F2;}
|
||||
.propertiesWindowDrag{position:absolute; background-image: url(/images/transparent.gif)}
|
||||
.propertiesMenuName{font-weight:700; font-size:12px}
|
||||
.propertiesMenuValue{font-size:12px;}
|
||||
|
||||
.dragIdentifier{position:absolute; display: none; border: 3px dotted black; font-size: 12;}
|
||||
|
||||
#crumbtrail{
|
||||
color: #3E697E;
|
||||
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, Arial, sans-serif;
|
||||
}
|
||||
.am-grid {
|
||||
height: 100%;
|
||||
font: menu;
|
||||
}
|
||||
.am-grid-headers {
|
||||
background-color:#ffffff;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
/*background-color: #BCD4DF; */
|
||||
}
|
||||
|
||||
.am-grid-header-0 {
|
||||
width: 10px;
|
||||
background-color: #F2F3F4;
|
||||
border-left: 1px solid #fff;
|
||||
border-right: 1px solid #7F949F;
|
||||
border-bottom: 2px solid #7F949F;
|
||||
padding: 0 10px 0 0;
|
||||
text-align: right;
|
||||
}
|
||||
.am-grid-header-0 img{
|
||||
padding: 0 3px 0 3px;
|
||||
}
|
||||
.am-grid-header-0 .over{
|
||||
width: 10px;
|
||||
background-color: #F2F3F4;
|
||||
border-left: 1px solid #fff;
|
||||
border-right: 1px solid #7F949F;
|
||||
border-bottom: 2px solid #EA5600;
|
||||
padding: 0 10px 0 0;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.am-grid-header-1 {
|
||||
width: 200px;
|
||||
background-color: #F2F3F4;
|
||||
border-left: 1px solid #fff;
|
||||
border-right: 1px solid #7F949F;
|
||||
border-bottom: 2px solid #7F949F;
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
.am-grid-header-1 img{
|
||||
padding: 0 3px 0 3px;
|
||||
}
|
||||
|
||||
.am-grid-header-2 {
|
||||
width: 50px;
|
||||
background-color: #F2F3F4;
|
||||
border-left: 1px solid #fff;
|
||||
border-right: 1px solid #7F949F;
|
||||
border-bottom: 2px solid #7F949F;
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
.am-grid-header-2 img{
|
||||
padding: 0 3px 0 3px;
|
||||
}
|
||||
|
||||
.am-grid-header-3 {
|
||||
width: 150px;
|
||||
background-color: #F2F3F4;
|
||||
border-left: 1px solid #fff;
|
||||
border-right: 1px solid #7F949F;
|
||||
border-bottom: 2px solid #7F949F;
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
.am-grid-header-3 img{
|
||||
padding: 0 3px 0 3px;
|
||||
}
|
||||
|
||||
.am-grid-header-4 {
|
||||
width: 50px;
|
||||
background-color: #F2F3F4;
|
||||
border-left: 1px solid #fff;
|
||||
border-right: 1px solid #7F949F;
|
||||
border-bottom: 2px solid #7F949F;
|
||||
padding: 0 10px 0 0 ;
|
||||
text-align: right;
|
||||
}
|
||||
.am-grid-header-4 img{
|
||||
padding: 0 3px 0 3px;
|
||||
}
|
||||
.am-grid-row {
|
||||
color: #000;
|
||||
}
|
||||
.am-grid-row-over {
|
||||
background-color: #C0D2DA;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.am-grid-col-0 {
|
||||
width: 50px;
|
||||
cursor:move;
|
||||
text-align: right;
|
||||
padding: 0 10px 7px 0;
|
||||
}
|
||||
|
||||
.am-grid-col-1 {
|
||||
width: 200px;
|
||||
cursor:move;
|
||||
padding: 0 0 7px 10px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.am-grid-col-1 img{
|
||||
margin: 0px 10px 0 0;
|
||||
}
|
||||
.am-grid-col-2 {
|
||||
cursor:move;
|
||||
padding: 0 0 7px 10px;
|
||||
}
|
||||
.am-grid-col-3 {
|
||||
cursor:move;
|
||||
padding: 0 0 7px 10px;
|
||||
}
|
||||
.am-grid-col-4 {
|
||||
cursor:move;
|
||||
text-align: right;
|
||||
padding: 0 10px 7px 10px;
|
||||
}
|
||||
|
||||
|
||||
.am-crumbtrail {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.am-crumbtrail-header {
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
|
||||
}
|
||||
|
||||
.contextMenu{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left:0;
|
||||
font-size: 12px;
|
||||
display:none;
|
||||
text-decoration: none;
|
||||
background-color:#F0F0F0;
|
||||
border-bottom: 3px groove #999999;
|
||||
border-top: 0px groove #999999;
|
||||
border-right: 3px groove #999999;
|
||||
border-left: 0px groove #999999;}
|
||||
.contextMenu A{ font-size: 12px; text-decoration: none;}
|
||||
.contextMenuTabOver{
|
||||
background-color: #C3CFD4;
|
||||
text-decoration: none;
|
||||
width:100%;
|
||||
color: #154C66;
|
||||
font-size: 12px;
|
||||
}
|
||||
.contextMenuTab, .contextMenuTab A{background-color: #F0F0F0; width:100%; text-decoration: none; font-size: 12px; color:#000000;}
|
||||
|
||||
.dragIdentifier{
|
||||
position:absolute;
|
||||
display: none;
|
||||
border: 1px dashed #405F6E;
|
||||
font-size: 12;}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 70 B After Width: | Height: | Size: 64 B |
BIN
www/extras/assetManager/crumbArrow.gif
Normal file
BIN
www/extras/assetManager/crumbArrow.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 B |
BIN
www/extras/assetManager/down.gif
Normal file
BIN
www/extras/assetManager/down.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 182 B |
BIN
www/extras/assetManager/up.gif
Normal file
BIN
www/extras/assetManager/up.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 183 B |
Loading…
Add table
Add a link
Reference in a new issue