plugin_ckeditor_2.py 689 B

12345678910111213141516171819
  1. def browse():
  2. db = current.plugin_ckeditor.db
  3. table_upload = current.plugin_ckeditor.settings.table_upload
  4. browse_filter = current.plugin_ckeditor.settings.browse_filter
  5. set = db(table_upload.id>0)
  6. for key, val in browse_filter.items():
  7. if value[0] == '<':
  8. set = set(table_upload[key]<value[1:])
  9. elif value[0] == '>':
  10. set = set(table_upload[key]>value[1:])
  11. elif value[0] == '!':
  12. set = set(table_upload[key]!=value[1:])
  13. else:
  14. set = set(table_upload[key]==value)
  15. rows = set.select(orderby=table_upload.title)
  16. return dict(rows=rows, cknum=request.vars.CKEditorFuncNum)