douji1058 2015-02-08 14:44
浏览 46
已采纳

PHP Widget布局网格

I'm building a webapp which main purpose is displaying widgets on a display. These widgets have an variable size, so not every widget is even high or wide (But they are using standards like for example a grid system). Now I'm looking for the best way to save which widgets are used, and where they are placed. For example by using something like Gridstack the user can drag and place the widgets in an admin panel, but how should I save this? And how can I recall this and put in a empty Bootstrap page for example. Working with the Bootstrap Grid system would be great aswell.

I did some research on Google and here but didn't find any plugins or ways to do this.

  • 写回答

1条回答 默认 最新

  • dongri1989 2015-02-08 15:35
    关注

    I'm using 'Gridster' at the moment which this Gridstack is built off of/inspired by, so it probably won't be able to save for you.

    You'll need to do that, either by sending it back via AJAX or storing in local storage. As it looks similar, you should be able to find a 'serialization' function which should wrap it up ready for you to send to your PHP via AJAX.

    You may need to scan through the widgets and wrap them up in your own JSON string, such as the row/column/sizex/sizey which is all the grid system really needs to "add" a widget when its first loaded up, so as long as you can feed that back in you should be good to go.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 制裁名单20240508芯片厂商
  • ¥20 易康econgnition精度验证
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致