babaganoush / gridster-bundle
与Symfony2集成的Gridster
dev-master
2014-11-09 19:41 UTC
Requires
- bmatzner/jquery-bundle: >=1.11
- symfony/framework-bundle: >=2.2
This package is not auto-updated.
Last update: 2024-09-24 03:17:53 UTC
README
当前版本
gridster.js - v0.5.6 - 2014-09-25
安装
将bundle添加到你的composer.json文件中
// composer.json { "require": { // ... "babaganoush/gridster-bundle": "dev-master" } }
将bundle添加到你的应用程序内核中
// app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Babaganoush\GridsterBundle\BabaganoushGridsterBundle(), // ... ); }
使用Composer下载bundle
$ php composer.phar update babaganoush/gridster-bundle
安装资源
假设你的服务器公共目录命名为"web",安装公共供应商资源
$ php app/console assets:install web
可选,使用--symlink属性创建链接而不是资源的副本
$ php app/console assets:install --symlink web
使用方法
在你的HTML模板中引用所需的文件,例如
<link rel="stylesheet" type="text/css" href="{{ asset('bundles/babaganoushgridster/css/jquery.gridster.css') }}" />
Gridster脚本需要jQuery。该bundle安装了bmatzner/jquery-bundle,应在加载任何基础脚本之前引用。
<script type="text/javascript" src="{{ asset('bundles/bmatznerjquery/js/jquery.min.js') }}"></script> <script type="text/javascript" src="{{ asset('bundles/babaganoushgridster/js/jquery.gridster.js') }}"></script>
许可证
有关许可证信息,请参阅所包含文件的源代码