{"id":15880473,"url":"https://github.com/ninsuo/domajax","last_synced_at":"2025-03-17T12:31:36.186Z","repository":{"id":58232156,"uuid":"20888172","full_name":"ninsuo/domajax","owner":"ninsuo","description":"A jQuery plugin to build complete ajax calls without a line of javascript","archived":false,"fork":false,"pushed_at":"2016-12-17T17:47:53.000Z","size":2215,"stargazers_count":13,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-16T11:51:17.338Z","etag":null,"topics":["ajax","asynchronous","jquery","jquery-plugin"],"latest_commit_sha":null,"homepage":"http://domajax.fuz.org","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ninsuo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-16T14:37:50.000Z","updated_at":"2025-03-02T14:23:13.000Z","dependencies_parsed_at":"2022-08-31T00:20:56.045Z","dependency_job_id":null,"html_url":"https://github.com/ninsuo/domajax","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninsuo%2Fdomajax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninsuo%2Fdomajax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninsuo%2Fdomajax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninsuo%2Fdomajax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ninsuo","download_url":"https://codeload.github.com/ninsuo/domajax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243864640,"owners_count":20360356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ajax","asynchronous","jquery","jquery-plugin"],"created_at":"2024-10-06T03:09:17.964Z","updated_at":"2025-03-17T12:31:34.126Z","avatar_url":"https://github.com/ninsuo.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"domajax.fuz.org\n===========\n\nWelcome to Domajax repository.\n\n---\n\nIf you are looking for the domajax plugin, you can directly click [here](https://raw.githubusercontent.com/ninsuo/domajax/master/js/jquery.domajax.js).\n\nIf you want to read the documentation for that plugin, go to [http://domajax.fuz.org](http://domajax.fuz.org).\n\nIf you want to contribute to domajax, you're in the right place.\n\n---\n\nThis repository contains the whole domajax.com's website. If you want to add new options to domajax, you'll also need to add their documentation. This readme will help you to install the project and develop new features.\n\n\nInstallation\n------------\n\nYou need to install apache2 and php with some libraries to make Symfony2 work. If you're a linux user, you can do:\n\n    apt-get install apache2 php5 php5-cli php5-intl php5-xcache php5-mysql\n\nThen, download the project:\n\n```\ncd /var/www/\nmkdir domajax\ncd domajax\ngit clone https://github.com/Ninsuo/domajax.git .\nphp -r \"readfile('https://getcomposer.org/installer');\" | php\nphp composer.phar update\n```\n\nComposer will ask you some configuration, press enter each time to keep default values.\nIf you are using other symfony2 project, just set a different \"secret\" parameter.\n\nTo test the configuration, you can run:\n\n```\nphp app/check.php\n```\n\nAnd try to go to http://localhost/domajax/web/app.php\n\nCongratulations, you have now a working copy of domajax.com!\n\n---\n\nAdd new features to Domajax\n--------------------------\n\nThe jquery plugin `jquery.domajax.js` is divided into 2 main parts:\n\n- options initialization\n- options processing\n\nCode will speak better than me, so I let you check it out yourself in `web/js/domajax/jquery.domajax.js`\n\n---\n\nWhen you'll be done with your new feature, you'll need to write its documentation.\n\nIn this sample, you're writting the `data-script` option, **you'll need to replace this name by yours**. You can check how this documentation page looks [here](http://domajax.fuz.org/documentation/data-script).\n\n#### Configuration\n\n- In `app/config/domajax.yml`, you need to add your new option or your new event:\n\nFor an option:\n```\n    domajax-options:\n      # ...\n      data-script:\n        description: Executes given javascript code when an event occurs.\n        see-also: [data-callback, data-confirm]\n```\n\nThe `name` (here, `data-script`) is the technical name\n\nThe `description` should describe the new option very quickly, it will be displayed in menus and table of contents.\n\nThe `see-also` should contain related options, separated with a comma ( , ), and encapsulated between square brackets (  [ ] ).\n\nFor an event:\n```\n    domajax-events:\n      # ...\n      event-click:\n        title: Ajax when clicking elements (buttons, links...)\n        description: A common way to run ajax calls is to click on links, buttons, or even a div element.\n```\n\nThe `title` should describe the event very quickly, it will be displayed in menus and table of contents.\n\nThe `description` will be used as subtitle below the title in the documentation page.\n\n---\n\n#### Documentation\n\n- In `src/Fuz/DomAjaxBundle/Resources/views/Code/data-script.html.twig`, you need to write the documentation.\n\nDon't hesitate to copy/paste an existing sample to avoid HTML matters.\n\nYou can [see the data-script example here](https://github.com/Ninsuo/domajax/blob/master/src/Fuz/DomAjaxBundle/Resources/views/Code/data-script.html.twig).\n\n---\n\n#### Declare samples\n\n- In `src/Fuz/DomAjaxBundle/Resources/views/Samples/data-script.html.twig`, you need to configure live demonstrations.\n\nThe syntax is the following:\n\n```\n{# src/DomAjaxBundle/Resources/views/Samples/data-script.html.twig #}\n{% import 'FuzDomAjaxBundle:Default:macros.html.twig' as macros %}\n\n{{\n    macros.demos_tabs('data-script', [\n        {\n            'title': 'Alert!',\n            'content': macros.demo_tabs('script-alert', true, 'php'),\n        },\n        ...\n    ])\n}}\n```\n\n`title` is the one displayed at the left side of the \"live examples\" tabs.\n\n`content` is a function that takes 3 arguments:\n\na) the demo name (here, `script-alert`): this name is used for file names stored in `web/demos`.\n\nThere are two files required for a new demonstration:\n\n- the view, `script-alert-view.html`, [like this](https://github.com/Ninsuo/domajax/blob/master/web/demo/script-alert-view.html), that contains the html code with the domajaxed form.\n\n- the handler, `script-alert-handler.php`, [like this](https://github.com/Ninsuo/domajax/blob/master/web/demo/script-alert-handler.php), to process the form.\n\nb) a boolean, that tells if the \"This code looks like this: \" pane should be displayed or not.\n\nThe displayed code below \"This code looks like this\" is taken from the view, between `\u003c!-- demo starts here --\u003e` and `\u003c!-- demo ends here --\u003e` strings.\n\nc) the demo view's file extension (if unset, 'html').\n\nSometimes, you need create a view in php (to include the handler who generates a table for example), use this last parameter to do it.\n\nYou can [see the data-script example here](https://github.com/Ninsuo/domajax/blob/master/src/Fuz/DomAjaxBundle/Resources/views/Samples/data-script.html.twig).\n\n\n---\n\n#### Develop samples\n\n- You now need to create your samples.\n\nFor each one:\n\na) create the view: web/demos/script-alert-view.html [see example](https://github.com/Ninsuo/domajax/blob/master/web/demo/script-alert-view.html)\n\nb) create the handler: web/demos/script-alert-handler.php [see example](https://github.com/Ninsuo/domajax/blob/master/web/demo/script-alert-handler.php)\n\nYou don't have the choice for the `-view` and `-handler` suffixes, as they are automatically generated.\n\n---\n\nLicense\n---\n\nDomajax is released in the same way as [jQuery fundation projects](https://jquery.org/license/).\n\nSource code :\n\nDomajax is released under the terms of the [MIT license](http://en.wikipedia.org/wiki/MIT_License).\nThe MIT License is simple and easy to understand and it places almost no restrictions on what you can do with domajax.\nYou are free to use domajax in any project (even commercial projects) as long as the copyright header is left intact.\n\nSamples code :\n\nAll demos and examples, whether in a code project's repository or displayed on this website, are released under the terms of\n[CC0](http://en.wikipedia.org/wiki/CC0#Zero_.2F_Public_domain\"). CC0 is even more permissive than the MIT license, allowing you to\nuse the code in any manner you want, without any copyright headers, notices, or other attribution.\n\nWeb site :\n\nContents on domajax web site are released under the terms of the [MIT license](http://en.wikipedia.org/wiki/MIT_License).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninsuo%2Fdomajax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fninsuo%2Fdomajax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninsuo%2Fdomajax/lists"}