spacedeck_modals.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. var SpacedeckModals = {
  2. data: {
  3. active_modal: null,
  4. active_account_section: "user",
  5. active_space_profile_section: null,
  6. account_sections: [
  7. {
  8. id: "user",
  9. title: "Profile",
  10. icon: "icon-user",
  11. },
  12. {
  13. id: "language",
  14. title: "Language",
  15. icon: "icon-globe",
  16. },
  17. {
  18. id: "email-notifications",
  19. title: "Notifications",
  20. icon: "icon-bell",
  21. },
  22. {
  23. id: "reset-password",
  24. title: "Password",
  25. icon: "icon-lock-closed",
  26. },
  27. {
  28. id: "remove-account",
  29. title: "Terminate",
  30. icon: "icon-logout",
  31. }
  32. ],
  33. folder_profile_sections: [
  34. {
  35. id: "editors",
  36. title: "Editors",
  37. icon: "icon-user-group",
  38. count: 1
  39. },
  40. {
  41. id: "visibility",
  42. title: "Visibility",
  43. icon: "icon-eye-open",
  44. count: 1
  45. }
  46. ],
  47. space_profile_sections: [
  48. {
  49. id: "comments",
  50. title: "Comments",
  51. icon: "icon-messages",
  52. count: 1
  53. },
  54. {
  55. id: "history",
  56. title: "History",
  57. icon: "icon-history",
  58. count: 1
  59. },
  60. {
  61. id: "editors",
  62. title: "Editors",
  63. icon: "icon-user-group",
  64. count: 1
  65. },
  66. {
  67. id: "visibility",
  68. title: "Visibility",
  69. icon: "icon-eye-open",
  70. count: 1
  71. }
  72. ]
  73. },
  74. methods: {
  75. activate_modal: function(id) {
  76. this.active_modal = id;
  77. if (id == "folder-settings") {
  78. this.access_settings_space = this.active_folder;
  79. this.access_settings_memberships = this.active_space_memberships;
  80. this.editors_section = "list";
  81. }
  82. },
  83. close_modal: function() {
  84. this.active_modal = null;
  85. },
  86. activate_account_section: function(section_id) {
  87. this.active_account_section = section_id;
  88. },
  89. activate_space_profile_section: function(section_id) {
  90. this.active_space_profile_section = section_id;
  91. }
  92. }
  93. }