JS tricks Bootstrap theme
Some js functions example
HIDE CODE
<button onclick="Xcrud.reload()">Reload button</button> <button onclick="Xcrud.show_message('.xcrud-ajax','This is error!','error')">Show error</button> <button onclick="Xcrud.show_message('.xcrud-ajax','Got it!','success')">Show success</button> <button onclick="Xcrud.show_message('.xcrud-ajax','Mmm... Maybe you right...','note')">Show note</button> <button onclick="Xcrud.show_message('.xcrud-ajax','Some information','info')">Show info</button> <button onclick="Xcrud.request('.xcrud-ajax',Xcrud.list_data('.xcrud-ajax',{task:'edit',primary:128}))">Edit entry #128</button> <button onclick="Xcrud.modal('My modal','<h1>Hello World!</h1>')">Show modal</button> <?php $xcrud = Xcrud::get_instance(); $xcrud->table('customers'); echo $xcrud->render(); ?> <script type="text/javascript"> jQuery(document).on("xcrudafterrequest",function(event,container){ if(Xcrud.current_task == 'save') { Xcrud.show_message(container,'WOW!','success'); } }); </script>
Customers
# | Customername | Contactlastname | Contactfirstname | Phone | Addressline1 | Addressline2 | City | State | Postalcode | Country | Salesrepemployeenumber | Creditlimit | Avatar | Photo | Attach | Sex | Interests | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Atelier graphique | Schmitt | Carine | 40.32.2555 | 54, rue Royale | Nantes | 44000 | France | 1370 | 21000 | male | View Edit Remove | ||||||
2 | Signal Gift Stores | King | Jean | 7025551838 | 8489 Strong St. | Las Vegas | NV | 83030 | USA | 1166 | 71800 | male | View Edit Remove | |||||
3 | Australian Collectors, Co. | Ferguson | Peter | 03 9520 4555 | 636 St Kilda Road | Level 3 | Melbourne | Victoria | 3004 | Australia | 1611 | 117300 | male | View Edit Remove | ||||
4 | La Rochelle Gifts | Labrune | Janine | 40.67.8555 | 67, rue des Cinquante Otages | Nantes | 44000 | France | 1370 | 118200 | male | View Edit Remove | ||||||
5 | Baane Mini Imports | Bergulfsen | Jonas | 07-98 9555 | Erling Skakkes gate 78 | Stavern | 4110 | Norway | 1504 | 81700 | male | girls, drinks, fights | View Edit Remove | |||||
6 | Mini Gifts Distributors Ltd. | Nelson | Susan | 4155551450 | 5677 Strong St. | San Rafael | CA | 97562 | USA | 1165 | 210500 | male | View Edit Remove | |||||
7 | Zbyszek Zbyszek Piestrzeniewicz | Piestrzeniewicz | Zbyszek | 266427555 | ul. Filtrowa 68 | Warszawa | Nairobi | 01-012 | Poland | 1230 | male | cars, fights, cooking | View Edit Remove | |||||
8 | Blauer See Auto, Co. | Keitel | Roland | +49 69 66 90 2555 | Lyonerstr. 34 | Frankfurt | 60528 | Germany | 1504 | 59700 | male | View Edit Remove | ||||||
9 | Mini Wheels Co. | Murphy | Julie | 6505555787 | 5557 North Pendale Street | San Francisco | CA | 94217 | USA | 1165 | 64600 | male | View Edit Remove | |||||
10 | Land of Toys Inc. | Lee | Kwai | 2125557818 | 897 Long Airport Avenue | NYC | NY | 10022 | USA | 1323 | 114900 | male | View Edit Remove |