Jump to content

Juergen

Members
  • Posts

    1,395
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by Juergen

  1. OK I have tried the following: I have added the following script to the admin.php file <script type="text/javascript"> a = "test"; console.log(a.length); obj = bce_toggleControl; console.log(obj.length); </script> The variable a with the content "test" is only to check if the console.log works. I got the following output: As you can see the variable "a" has a length of 4 - this is correct. But the variable "bce_toggleControl" which is responsible for the checkbox doesnt return anything. I have also tried it with bce_fieldID depending on this snippet // add column controls (top, bottom and replace modes) $(document).on('loaded', '#' + bce_fieldID, function () { addBceColumnControls(); }); Same result
  2. Now I have tested it with the browser console. As you can see, there are no JS-errors: In line 165 of the BatchChildEditor.js the checkbox markup will be declared: bce_toggleControl = '<input type="checkbox" class="' + bce_columnControlClass + '" style="position: relative; top: 2px; margin-right: 4px;" />', But this markup will not be added next to tableheader cells. I havent been working with the browser console so far. Maybe I am doing something wrong or I am in the wrong part of the console, but I cannot find an error.
  3. Thanks @adrian, now the "double list" problem is gone. Your fix works
  4. Ah I see, I have custom labels for my children tab. In may case its called "Events". So it doesnt fetch "Children or Subpages".
  5. I can switch between "English" and "German" admin but there is no difference in my case. No there is no conflict between AOS and this module. The function seems ok. I have all my custom admin scripts disabled too. Maybe there is another module which could be responsible for this behaviour. Anyway! If I get more time I will try to find out if there are interferring problems with other modules.
  6. I cannot find any errors in the browser console too. I also cannot find any markup for the "delete all" icon. The corresponding table header cell looks like this: <th style="width: 76px;">Delete</th> As you can see there is no additional markup.
  7. I have uploaded a picture of this behaviour in the previous post. The batch child editor will be shown in addition to the default children list (tree) of PW under the children tab. At the top there is the batch child table and below is the PW child table. I have choosen the "replace" mode which should replace the default PW list with the batch child list. No there are no errors in the Tracy bar.
  8. No, here are my settings:
  9. Just to mention: Batch child editor version 1.6.4 ProcessWire: 3.0.60 PHP: 5.6.30 Server: Apache MySQL: 5.5.54
  10. No its not there in my case. I have downloaded your module today so it is the current version. Another problem is that the "replace" mode shows the default children list too (under the batch child list). I use the latest dev version of PW.
  11. Hello Adrian, it would be a good addition if it is possible to delete all children at once (fe. toggle a checkbox or a "delete all" button) without deleting the parent page. Especially if there is a great amount of child pages. So you dont have to toggle the delete button of each child. Best regards
  12. Thanks @gebeer but after replacing the MarkupLeafletMap.module file with your version, the map will be not rendered at all. So its not a big problem. I can view the map without modal too. A code modification is not what I want. But thousand thanks for your efforts. Best regards
  13. Does anyone has tried to show a Leaflet map inside a UIKit modal? The problem is that the map will not be rendered properly. I have searched the web but didnt found a working solution. The only one that I have found was https://yootheme.com/support/question/80769 but I cannot adapt it to get it work. Maybe someone had the same problem and found a working solution. Best regards
  14. Does no one has an idea? I have used the code from this post on the lates PW dev version (3.0.58) https://processwire.com/talk/topic/6277-image-upload-field-and-display/ For testing purposes I have copied the code from this post and put it into a new template. Unfortunately this code leads to this error message: So this upload example code doesnt work in PW 3.0.58 any longer. Here is the complete code example if someone wants to test it. <?php $upload_path = $config->paths->assets . "files/avatar_uploads/"; $f = new WireUpload('userimage'); $f->setMaxFiles(1); $f->setMaxFileSize(5*1024*1024); $f->setOverwrite(true); $f->setDestinationPath($upload_path); $f->setValidExtensions(array('jpg', 'jpeg', 'png', 'gif')); if($input->post->form_submit) { if(!is_dir($upload_path)) { if(!wireMkdir($upload_path)) throw new WireException("No upload path!"); } $files = $f->execute(); if ($f->getErrors()) { foreach($files as $filename) @unlink($upload_path . $filename); foreach($f->getErrors() as $e) echo $e; } else { //$u = $users->get($user); //$u = $user->name; //Save the photo to the avatar field $user->of(false); $user->userimage = $upload_path . $files[0]; $user->save(); $user->of(true); @unlink($upload_path . $files[0]); } } ?> <div id="content"> <form class="uk-form" accept-charset="utf-8" action="./" method="post" enctype="multipart/form-data" > <input type="file" id="attach" name="userimage" accept="image/jpg,image/jpeg,image/gif,image/png" /> <input type="submit" name="form_submit" value="Submit"/> </form> </div> "userimage" is the name of the imagefield "files/avatar_uploads" is the name of the temp folder Best regards
  15. I guess the difference is that this works on standard frontend templates but not on user templates.
  16. No, this returns the same error message. I have tried it before. If I output (echo) $upload_path . $files[0] it will be outputted correctly, so I dont understand the error message because it is a string.
  17. I have also tried to make an image upload for an user image on the frontend: VARIABLES $user->userimage = PW form field that stores the user image userimage = name attribute of the formfield for the userimage on frontend //create userimage conditions $upload_path = $config->paths->assets . 'files/avatar_uploads/'; $f = new WireUpload('userimage'); $f->setMaxFiles(1); $f->setDestinationPath($upload_path); $f->setValidExtensions(array( 'jpg', 'jpeg', 'gif', 'png', )); //ERROR HANDLING $files = $f->execute(); if ($f->getErrors()) { $userimageclass = ' uk-form-danger'; foreach($f->getErrors() as $key=>$error) { $errors['imageerror'. $key] = $error; $imageerrormessage .= ukformhelpblockdanger($errors['imageerror'. $key]); } foreach($files as $filename) unlink($upload_path . $filename); } else { $userimageclass = ' uk-form-success'; } if ($files) { $user->userimage->removeAll(); // wirearray - remove all older images first $user->userimage = $upload_path . $files[0]; // store the new userimage -> THIS LINE CAUSES THE ERROR MESSAGE } The upload to the temp folder works but this line of code leads to an error message: $user->userimage = $upload_path . $files[0]; // store the new userimage -> THIS LINE CAUSES THE ERROR MESSAGE The settings for the image field is max-number = 1 and automatic. The image will be fetched properly: Maybe the problem is that the page is a user page and not a default frontend page. Can anyone help me out? Best regards
  18. Or you can use AdminOnSteroids which has this function integrated.
  19. Ok I have figured it out, but I think this is a bug. The field values will not be saved if an inputfield dependency "show only if" is set to the fields. After removing them the values will be stored. Does anyone experienced the same issue on a CKE field?
  20. Hello @all today I discovered a problem saving the introtext and body field in one of my templates. Saving these 2 fields works well in other templates. I have only the problem in one template. What I have tried so far (just to mention: ProcessWire: 3.0.52, PHP: 5.6.30, Server: Apache, MySQL: 5.5.54) Testing with different browsers Looking at the log files in asset/log folder (no relevant entries) Looking at Tracy (no error) Looking at PW debug without Tracy (no error) Disabling template specific Javascript Uncomment all lines in init.php and ready.php (so no Hook will be active on this template) I have discovered this problem at another field some time ago. Replacing this field with a new created one solved the problem. But in this case these 2 fields are part of every template, so I dont want to create a new one. Has someone an idea what I can do in addition to find out where the cause could be. I can change the value of these fields directly in the database - no problem. Then the values will be displayed properly at the backend, so the problem must be during the saving process of these fields (all other fields on this template will be saved correctly). Best regards
  21. Yep, this was the mistake!!!!!! Now it works as expected. Thousand thanks!!!!
  22. This hook works well on page load, but not after update of the pagetable field It is the same problem as the Jquery solution. I have replaced my Jquery manipulation with this hook
  23. Hello @all, I use a pagetable field for events as children. For better visibility for active and cancelled events I use Jquery to manipulate the output of the pagetable field. Active events are green and cancelled events are red (see screenshot) This is the Jquery code snippet: jQuery(document).ready(function() { $("#wrap_Inputfield_singleeventtable table tbody tr[data-filter*='aktiv'] td:nth-child(2) ul li").wrapInner('<span class="uk-badge active"></span>'); $("#wrap_Inputfield_singleeventtable table tbody tr[data-filter*='abgesagt'] td:nth-child(2) ul li").wrapInner('<span class="uk-badge cancelled"></span>'); }); This works well until I open a childpage via a link in the modal. After closing the modal the pagetable will be updated via Ajax. This is the point where the ready function has no longer impact on the manipulation. I am not very familiar with coding Jquery. Has anyone an idea which event could be triggered after Ajax update to manipulate the markup once more or if there is a better solution than Jquery ready function in this case. Best regards
  24. It would be great if inputfield dependencies would support multiple conditions with OR (see: https://processwire.com/talk/topic/15495-inputfield-dependencies-possible-to-add-multiple-conditions-with-or/) For example: condition1=1||condition2=1 The OR operator could be for example "||" and the AND operator is ",". Best regards
  25. Thanks @Robin S thats true, I need it on change and onload, so its a job for a custom jquery in my adminscripts.js
×
×
  • Create New...