Comments (2)
To fix this change the following file cms/widgets/views/resource/resource_upload_iframe_return.php with this:
<script type="text/javascript"> window.parent.afterUploadResource(resource_id) ?>,getFullPath()) ?>,,resource_type) ?>) window.parent.afterUploadResourceWithEditor(resource_id) ?>,getFullPath()) ?>,resource_type) ?>,,, ,) </script>To fix the edit button (so that it goes to the correct URL) you need to fix the generated URL in widgets/views/object/object_resource_form_widget.php by replacing the entire buildResourceList function with this:
function buildResourceList(id,link,key,file_type){
var current_resource_count=parseInt($('#resource_upload_'+key+'current_upload_count').val());
var current_resource_max=parseInt($('#resource_upload'+key+'_current_upload_max').val());
var next_resource_count=current_resource_count+1;
<?php
$backend_asset=bu();
?>
var link_resource_icon='<?php echo $backend_asset;?>/images/content_icons/'+file_type+'.png';
if(file_type=='image'){
link_resource_icon=link;
}
$('#resource_upload_'+key+'_current_upload_count').val(next_resource_count);
var resource_string=
'<li id="list_id_resource_upload_'+key+'_'+next_resource_count+'" align="left" style="background: transparent; float:left" >'+
'<input type="hidden" id="upload_id_resource_upload_'+key+'_link_'+next_resource_count+'" name="upload_id_resource_upload_'+key+'_link[]" value="'+link+'" />'+
'<input type="hidden" id="upload_id_resource_upload_'+key+'_resid_'+next_resource_count+'" name="upload_id_resource_upload_'+key+'_resid[]" value="'+id+'" />'+
'<input type="hidden" id="upload_id_resource_upload_'+key+'_type_'+next_resource_count+'" name="upload_id_resource_upload_'+key+'_type[]" value="'+file_type+'" />'+
'<div class="item_div_wrapper">'+
'<span class="item_name"><img style="background:#fff;padding:5px; border:1px dotted #CCC" src="'+link_resource_icon+'" width="50" /></span>'+
'<div class="item_buttons" style="margin-top:3px; margin-left:5px">'+
'<a href="<?php echo bu();?>/resource/update/id/'+id+'" target="_blank" name="editItem"><img alt="<?php echo t('cms','Edit'); ?>" src="<?php echo $backend_asset; ?>/images/edit.png" /></a> '+
'<a href="javascript:void(0)" onclick="fnRemoveResourceItem(\'list_id_resource_upload_'+key+'_'+next_resource_count+'\',\''+key+'\');" name="removeItem"><img alt="<?php echo t('cms','Delete'); ?>" src="<?php echo $backend_asset;?>/images/disabled.png" /></a>'+
'</div>'+
'</div>'+
'</li><li class="clear"></li>';
$('#'+key+'_resource_list li.clear').remove();
$('#'+key+'_resource_list').append(resource_string);
$('#resource_upload_'+key+'_current_upload_count').val(next_resource_count.toString());
$('#resource_upload_modified').val(1);
}
from gxc-cms-2.
thanks for answer.
موفق باشید
from gxc-cms-2.
Related Issues (20)
- upload resourses dont work HOT 1
- Allow to select primary term for content of each taxonomy HOT 1
- Consider to continue using rights module or switch to usergroups module HOT 1
- Caching Strategies for Page Render with Blocks
- Can't install using your tutorial HOT 2
- I'm getting some erros around the usage of t() function HOT 1
- can't install
- SystemSettingsForm.php has depreciated field $language_number
- Remove Amazon from storage ini file until it is developed HOT 1
- ContentList not filtering based on language selection HOT 1
- No install forlder
- GXC CMS Canot Install HOT 2
- failed setup
- 500 Internal Server Error while Installing
- View object content details in frontend
- there's no install folder
- Caching HOT 1
- incorrect password or username
- Some web/assets folder files are empty
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gxc-cms-2.