|
@@ -17,6 +17,9 @@ function init_plugin_hackpoint(){
|
|
|
onSort : hackpoint_sketch_search
|
|
|
});
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ //http://127.0.0.1/hackpoint/index.php?module=hackpoint&page=sheet.sketch&id=1&embeded=1&sidebar=1#resource=2
|
|
|
hackpoint_resource_search();
|
|
|
|
|
|
}
|
|
@@ -208,7 +211,7 @@ function hackpoint_sketch_share_mode(){
|
|
|
var data = {
|
|
|
sketch : $('#sketch-form').attr('data-id'),
|
|
|
resource : $.urlParam('resource'),
|
|
|
- menu : $('.share-menu-mode').prop('checked')?1:0,
|
|
|
+ menu : $('.share-menu-mode').prop('checked')?0:1,
|
|
|
url : window.location.protocol+'//' + window.location.hostname + window.location.pathname
|
|
|
}
|
|
|
var html = Mustache.render(tpl,data);
|
|
@@ -284,6 +287,7 @@ function hackpoint_resource_search(callback,triggered){
|
|
|
|
|
|
var trigger = '#resources li:eq(1)';
|
|
|
if(triggered){
|
|
|
+
|
|
|
trigger = triggered;
|
|
|
}else if($.urlParam('resource')){
|
|
|
trigger = '#resources li[data-id="'+$.urlParam('resource')+'"]';
|
|
@@ -309,8 +313,16 @@ function hackpoint_resource_edit(element){
|
|
|
.attr('data-id',id)
|
|
|
.attr('class','resource-'+r.resourceType);
|
|
|
|
|
|
-
|
|
|
- window.history.replaceState(null, null, "index.php?module=hackpoint&page=sheet.sketch&id="+$('#sketch-form').attr('data-id')+"&resource="+id);
|
|
|
+ var parameters = $.urlParam();
|
|
|
+ parameters.id = $('#sketch-form').attr('data-id');
|
|
|
+ parameters.resource = id;
|
|
|
+ var urlString = 'index.php?';
|
|
|
+ var parameterStrings = [];
|
|
|
+ for (var key in parameters) {
|
|
|
+ parameterStrings.push(key+'='+parameters[key]);
|
|
|
+ }
|
|
|
+ urlString+= parameterStrings.join('&');
|
|
|
+ window.history.replaceState(null, null, urlString);
|
|
|
|
|
|
init_components('#sketch-editor');
|
|
|
if(r.javascript){
|