thedigicraft / Atom.CMS

Atom.CMS
56 stars 50 forks source link

delete button not working #192

Open Manjot-Kaur opened 8 years ago

Manjot-Kaur commented 8 years ago

The delete button in page manager is not working. #VIDEO 68 and 69 the code is: capture On ruuning the firebug and clicking the button this is what it looks like: capture1

creptor commented 8 years ago

I believe this issue is going to be fixed in the next videos, because your code look way different than mine 😋.

Another thing to notice is that you're calling the script before any content is loaded, and that means that the html attribute class="btn-delete" doesn't exist (by the time the script is called).

To fix this, just put the function inside of:

$(document).ready(function(){
});

So it will execute once the page has finished loading.

Manjot-Kaur commented 8 years ago

On using the function $(document).ready(function(){ }); the confirmation box appears and on clicking ok the page goes out from the page list. But on refreshing it comes again. Here is the code: capture3

creptor commented 8 years ago

The part of your code that isn't working correctly is the ajax/pages.php, please put that code in here so I can look it up 😋

Manjot-Kaur commented 8 years ago

4

creptor commented 8 years ago

Ok, I didn't found a error here, maybe it's in the page administrator, please post the complete code for the page administrator so I can check if the button is not the problem.

Please use http://pastebin.com/

Manjot-Kaur commented 8 years ago

The code is working fine now and delete button is operating. The problem was in the function in the js.php. Thank you

creptor commented 8 years ago

Nice. Next time try to always use code instead of images, as you may see, they're difficult to work with 😋.