Permalink
Browse files

SAKIII-4927 - "More widgets" improvements

Squashed commit of the following:

commit 6a5855361afd6fa839ac005b71ea8a49e3ca1664
Merge: 37041ba 7ceac5d
Author: Chris Roby <christopher.roby@gmail.com>
Date:   Fri Mar 2 13:27:26 2012 -0800

    Merge remote-tracking branch 'nicolaasmatthijs/SAKIII-4927' into nicolaasmatthijs-SAKIII-4927

commit 7ceac5d
Author: Nicolaas Matthijs <nicolaas.matthijs@caret.cam.ac.uk>
Date:   Fri Mar 2 20:55:49 2012 +0000

    SAKIII-4927 - Following up on code review

commit 93daab2
Author: Nicolaas Matthijs <nicolaas.matthijs@caret.cam.ac.uk>
Date:   Fri Mar 2 19:31:34 2012 +0000

    SAKIII-4927 - Following up on code review

commit 31c1bab
Author: Nicolaas Matthijs <nicolaas.matthijs@caret.cam.ac.uk>
Date:   Fri Mar 2 19:25:45 2012 +0000

    SAKIII-4927 - Code styleguide cleanup

commit 44e7c05
Author: Nicolaas Matthijs <nicolaas.matthijs@caret.cam.ac.uk>
Date:   Fri Mar 2 19:20:36 2012 +0000

    SAKIII-4927 - Documenting new config variable

commit be009a6
Author: Nicolaas Matthijs <nicolaas.matthijs@caret.cam.ac.uk>
Date:   Fri Mar 2 19:03:15 2012 +0000

    SAKIII-4927 - "More widgets" improvements

commit 2171762
Merge: 74112e3 0ba902b
Author: Nicolaas Matthijs <nicolaas.matthijs@caret.cam.ac.uk>
Date:   Fri Mar 2 18:15:05 2012 +0000

    Merge branch '1.2.0' into SAKIII-4927

    * 1.2.0:
      SAKIII-5161 Fixing JSHint errors

commit 74112e3
Author: Nicolaas Matthijs <nicolaas.matthijs@caret.cam.ac.uk>
Date:   Fri Mar 2 17:59:48 2012 +0000

    SAKIII-4927 - "More widgets" improvements
  • Loading branch information...
1 parent 37041ba commit cbe88e0040a7b60c38e2c57a2c9127f6a330de6b Nicolaas Matthijs committed with croby Mar 2, 2012
Showing with 106 additions and 164 deletions.
  1. +5 −0 dev/configuration/config.js
  2. +13 −0 dev/lib/sakai/sakai.api.widgets.js
  3. +2 −8 devwidgets/_template/config.json
  4. +0 −1 devwidgets/addarea/config.json
  5. +0 −1 devwidgets/allcategories/config.json
  6. +0 −1 devwidgets/areapermissions/config.json
  7. +1 −2 devwidgets/basiclti/config.json
  8. +0 −1 devwidgets/carousel/config.json
  9. +0 −1 devwidgets/categories/config.json
  10. +0 −1 devwidgets/collectionviewer/config.json
  11. +2 −2 devwidgets/comments/config.json
  12. BIN ...s/{inserterbar/images/inserterbar_comments_widget_hover.png → comments/images/comments_hover.png}
  13. +1 −2 devwidgets/contentauthoring/config.json
  14. +0 −1 devwidgets/contentcomments/config.json
  15. +0 −1 devwidgets/dashboard/config.json
  16. +2 −2 devwidgets/discussion/config.json
  17. BIN ...erterbar/images/inserterbar_discussion_widget_hover.png → discussion/images/discussion_hover.png}
  18. +1 −1 devwidgets/embedcontent/config.json
  19. +0 −1 devwidgets/featuredcontent/config.json
  20. +0 −1 devwidgets/featuredpeople/config.json
  21. +0 −1 devwidgets/featuredworlds/config.json
  22. +0 −1 devwidgets/ggadget/config.json
  23. +2 −2 devwidgets/googlemaps/config.json
  24. BIN ...erterbar/images/inserterbar_googlemaps_widget_hover.png → googlemaps/images/googlemaps_hover.png}
  25. +0 −1 devwidgets/helloworld/config.json
  26. +1 −2 devwidgets/htmlblock/config.json
  27. +0 −1 devwidgets/inserter/config.json
  28. +1 −3 devwidgets/inserterbar/bundles/default.properties
  29. +0 −1 devwidgets/inserterbar/config.json
  30. +11 −35 devwidgets/inserterbar/css/inserterbar.css
  31. BIN devwidgets/inserterbar/images/helloworld_icon.png
  32. BIN devwidgets/inserterbar/images/inserterbar_comments_widget.png
  33. BIN devwidgets/inserterbar/images/inserterbar_discussion_widget.png
  34. BIN devwidgets/inserterbar/images/inserterbar_googlemaps_widget.png
  35. +25 −22 devwidgets/inserterbar/inserterbar.html
  36. +31 −31 devwidgets/inserterbar/javascript/inserterbar.js
  37. +0 −1 devwidgets/institutionalskinning/config.json
  38. +0 −1 devwidgets/lhnavigation/config.json
  39. +0 −1 devwidgets/listpeoplewrappergroup/config.json
  40. +0 −1 devwidgets/mylibrary/config.json
  41. +0 −1 devwidgets/navigation/config.json
  42. +0 −1 devwidgets/newaddcontent/config.json
  43. +1 −2 devwidgets/pagetitle/config.json
  44. +0 −1 devwidgets/pageviewer/config.json
  45. +0 −1 devwidgets/participants/config.json
  46. +0 −1 devwidgets/poll/config.json
  47. +0 −1 devwidgets/recentactivity/config.json
  48. +1 −2 devwidgets/remotecontent/config.json
  49. +1 −2 devwidgets/rss/config.json
  50. +1 −2 devwidgets/sakai2tools/config.json
  51. +0 −1 devwidgets/searchall/config.json
  52. +0 −1 devwidgets/searchcontent/config.json
  53. +0 −1 devwidgets/searchgroups/config.json
  54. +0 −1 devwidgets/searchpeople/config.json
  55. +1 −2 devwidgets/searchsakai2/config.json
  56. +0 −1 devwidgets/systemtour/config.json
  57. +0 −1 devwidgets/uploadnewversion/config.json
  58. +0 −1 devwidgets/userpermissions/config.json
  59. +0 −1 devwidgets/versions/config.json
  60. +0 −1 devwidgets/video/config.json
  61. +0 −1 devwidgets/welcome/config.json
  62. +0 −1 devwidgets/worldsettings/config.json
  63. +3 −6 tests/qunit/tests/unit/js/widgets.js
@@ -1551,6 +1551,11 @@ define(function(){
'tr','zh','bs','dv','fi','hy','km','ms','pt','sq','tt','zu','ca','el','fr','ia','ko','my','ro','sr','tw']
},
+ /**
+ * The list of widgets (other than the fixed set) that should be shown inside
+ * of the inserterbar for content authoring.
+ */
+ exposedSakaiDocWidgets: ["discussion", "comments", "googlemaps"],
/*
* Default structure and content that should be given to a newly created
* Sakai Documented. If no default content is specified, an empty page placeholder
@@ -858,6 +858,19 @@ define(
},
/**
+ * This function will return widget configuration for a specific widget
+ * @param {Object} widgetid id of the widget as specified in the widget's config file
+ */
+ getWidget: function(widgetid) {
+ if (sakai.widgets[widgetid]) {
+ return sakai.widgets[widgetid];
+ } else {
+ debug.error('A config file was not found for the following widget: ' + widgetid);
+ return false;
+ }
+ },
+
+ /**
* This function will return the name of a widget in the current user's language
* @param {Object} widgetid id of the widget as specified in the widget's config file
*/
@@ -11,8 +11,7 @@
* displayed to users
* - enabled {Boolean} sets whether or not this widget may be used by Sakai OAE
* - sakaidocs {Boolean} sets whether or not this widget can be placed in
- * a pages created as content (showinsakaigoodies must also be enabled to
- * access this widget from the page editor)
+ * a pages created as content
* - hasSettings {Boolean} sets whether or not this widget has a settings menu
* option to allow users to configure or change the widget's settings.
* - i18n {Object} sets the location of internationalization files for this
@@ -23,10 +22,6 @@
* - name {String} a short name for the widget that is displayed to users.
* - personalportal {Boolean} sets whether or not this widget may be used on a
* user's personal portal (more commonly known as 'Home' or 'My Dashboard').
- * - showinsakaigoodies {Boolean} sets whether or not this widget may appear in
- * the list of widgets that can be placed on either a standard group or user
- * page (either grouppages or userpages must also be enabled to access this
- * widget from the page editor)
* - type {String} ["core" | "sakai" | "contrib"] 'core' widgets are essential
* for Sakai OAE to function properly (i.e. login, uploadcontent).
* 'sakai' widgets are not essential for Sakai OAE to function properly, but
@@ -51,6 +46,5 @@
}
},
"personalportal": false,
- "sakaidocs": false,
- "showinsakaigoodies": false
+ "sakaidocs": false
}
@@ -12,7 +12,6 @@
},
"id": "addarea",
"personalportal": false,
- "showinsakaigoodies": false,
"type": "sakai",
"url": "/devwidgets/addarea/addarea.html",
"userdashboard": false,
@@ -12,7 +12,6 @@
},
"id": "allcategories",
"personalportal": false,
- "showinsakaigoodies": false,
"type": "sakai",
"url": "/devwidgets/allcategories/allcategories.html",
"userdashboard": false,
@@ -12,7 +12,6 @@
},
"id": "areapermissions",
"personalportal": false,
- "showinsakaigoodies": false,
"type": "core",
"url": "/devwidgets/areapermissions/areapermissions.html",
"userdashboard": false,
@@ -17,6 +17,5 @@
"userpages": true,
"userdashboard": true,
"grouppages": true,
- "groupdashboard": true,
- "showinsakaigoodies":true
+ "groupdashboard": true
}
@@ -12,7 +12,6 @@
},
"id": "carousel",
"personalportal": false,
- "showinsakaigoodies": false,
"type": "sakai",
"url": "/devwidgets/carousel/carousel.html",
"userdashboard": false,
@@ -12,7 +12,6 @@
},
"id": "categories",
"personalportal": false,
- "showinsakaigoodies": false,
"type": "sakai",
"url": "/devwidgets/categories/categories.html",
"userdashboard": false,
@@ -12,7 +12,6 @@
},
"id": "collectionviewer",
"personalportal": false,
- "showinsakaigoodies": false,
"type": "sakai",
"url": "/devwidgets/collectionviewer/collectionviewer.html",
"userdashboard": false,
@@ -8,12 +8,12 @@
"i18n": {
"default": {
"bundle": "/devwidgets/comments/bundles/default.properties",
- "name":"Comments",
+ "name":"Comment stream",
"description":"Comments"
}
},
"img":"/devwidgets/comments/images/comments.png",
- "showinsakaigoodies":true,
+ "imghover": "/devwidgets/comments/images/comments_hover.png",
"type":"sakai",
"enabled":true,
"sakaidocs": true,
@@ -12,6 +12,5 @@
}
},
"personalportal": false,
- "sakaidocs": false,
- "showinsakaigoodies": false
+ "sakaidocs": false
}
@@ -13,7 +13,6 @@
}
},
"img":"/devwidgets/contentcomments/images/comments.png",
- "showinsakaigoodies":false,
"type":"core",
"enabled":true,
"url":"/devwidgets/contentcomments/contentcomments.html"
@@ -10,7 +10,6 @@
}
},
"img":"/devwidgets/comments/images/comments.png",
- "showinsakaigoodies":false,
"type":"core",
"enabled":true,
"url":"/devwidgets/dashboard/dashboard.html"
@@ -5,10 +5,11 @@
"groupdashboard": true,
"id":"discussion",
"img":"/devwidgets/discussion/images/discussion.png",
+ "imghover":"/devwidgets/discussion/images/discussion_hover.png",
"i18n": {
"default": {
"bundle": "/devwidgets/discussion/bundles/default.properties",
- "name": "Discussion",
+ "name": "Discussion forum",
"description":"Discussion widget"
},
"en_US": {
@@ -18,7 +19,6 @@
"bundle": "/devwidgets/discussion/bundles/zh_CN.properties"
}
},
- "showinsakaigoodies":true,
"hasSettings": true,
"type":"sakai",
"enabled":true,
@@ -2,7 +2,7 @@
"grouppages": true,
"userpages": true,
"hasSettings": true,
- "sakaidocs": true,
+ "sakaidocs": false,
"id":"embedcontent",
"i18n": {
"default": {
@@ -12,7 +12,6 @@
},
"id": "featuredcontent",
"personalportal": false,
- "showinsakaigoodies": false,
"type": "sakai",
"url": "/devwidgets/featuredcontent/featuredcontent.html",
"userdashboard": false,
@@ -12,7 +12,6 @@
},
"id": "featuredpeople",
"personalportal": false,
- "showinsakaigoodies": false,
"type": "sakai",
"url": "/devwidgets/featuredpeople/featuredpeople.html",
"userdashboard": false,
@@ -12,7 +12,6 @@
},
"id": "featuredworlds",
"personalportal": false,
- "showinsakaigoodies": false,
"type": "sakai",
"url": "/devwidgets/featuredworlds/featuredworlds.html",
"userdashboard": false,
@@ -13,7 +13,6 @@
}
},
"img":"/devwidgets/ggadget/images/ggadget.png",
- "showinsakaigoodies":true,
"hasSettings": true,
"type":"sakai",
"enabled":true,
@@ -8,7 +8,7 @@
"i18n": {
"default": {
"bundle": "/devwidgets/googlemaps/bundles/default.properties",
- "name": "Google maps",
+ "name": "Google map",
"description":"Google maps"
},
"en_US": {
@@ -20,7 +20,7 @@
},
"id":"googlemaps",
"img":"/devwidgets/googlemaps/images/googlemaps.png",
- "showinsakaigoodies":true,
+ "imghover":"/devwidgets/googlemaps/images/googlemaps_hover.png",
"type":"sakai",
"enabled":true,
"defaultLat":52.2025441,
@@ -12,7 +12,6 @@
},
"id": "helloworld",
"personalportal": false,
- "showinsakaigoodies": false,
"type": "sakai",
"url": "/devwidgets/helloworld/helloworld.html",
"userdashboard": false,
@@ -12,6 +12,5 @@
}
},
"personalportal": false,
- "sakaidocs": true,
- "showinsakaigoodies": false
+ "sakaidocs": false
}
@@ -12,7 +12,6 @@
},
"id": "inserter",
"personalportal": false,
- "showinsakaigoodies": false,
"type": "sakai",
"url": "/devwidgets/inserter/inserter.html",
"userdashboard": false,
@@ -1,11 +1,9 @@
ADD_PAGE = Add page
CLOSE_PAGE_REVISIONS = Close page revisions
FORMAT = Format
-INSERT_COMMENT_STREAM = Insert comment stream
-INSERT_DISCUSSION_FORUM = Insert discussion forum
+INSERT = Insert
INSERT_FILE_LIST = Insert file list
INSERT_IMAGE = Insert image
-INSERT_MAP = Insert map
INSERT_TEXT_BLOCK = Insert text block
INSERT_TITLE = Insert title
INSERT_VIDEO = Insert video
@@ -12,7 +12,6 @@
},
"id": "inserterbar",
"personalportal": false,
- "showinsakaigoodies": false,
"type": "core",
"url": "/devwidgets/inserterbar/inserterbar.html",
"userdashboard": false,
@@ -59,11 +59,7 @@
}
#inserterbar_widget #inserterbar_more_widgets_container .inserterbar_widget_container {
- margin: 2px 0 0 64px;
-}
-
-#inserterbar_widget #inserterbar_more_widgets_container hr {
- margin-bottom: 2px;
+ margin: 2px 0 0;
}
#inserterbar_widget .inserterbar_label {
@@ -168,31 +164,10 @@
background: url("/devwidgets/inserterbar/images/inserterbar_filelist_widget_hover.png") no-repeat top left transparent;
}
-#inserterbar_widget .inserterbar_discussion_widget {
- background: url("/devwidgets/inserterbar/images/inserterbar_discussion_widget.png") no-repeat top left transparent;
-}
-#inserterbar_widget .inserterbar_discussion_widget:hover, #inserterbar_widget .inserterbar_discussion_widget:focus {
- background: url("/devwidgets/inserterbar/images/inserterbar_discussion_widget_hover.png") no-repeat top left transparent;
-}
-
-#inserterbar_widget .inserterbar_comments_widget {
- background: url("/devwidgets/inserterbar/images/inserterbar_comments_widget.png") no-repeat top left transparent;
-}
-#inserterbar_widget .inserterbar_comments_widget:hover, #inserterbar_widget .inserterbar_comments_widget:focus {
- background: url("/devwidgets/inserterbar/images/inserterbar_comments_widget_hover.png") no-repeat top left transparent;
-}
-
-#inserterbar_widget .inserterbar_googlemaps_widget {
- background: url("/devwidgets/inserterbar/images/inserterbar_googlemaps_widget.png") no-repeat top left transparent;
-}
-#inserterbar_widget .inserterbar_googlemaps_widget:hover, #inserterbar_widget .inserterbar_googlemaps_widget:focus {
- background: url("/devwidgets/inserterbar/images/inserterbar_googlemaps_widget_hover.png") no-repeat top left transparent;
-}
-
/* Carousel */
#inserterbar_widget .inserterbar_carousel_arrow {
cursor: pointer;
- height: 100px;
+ height: 35px;
width: 25px;
}
@@ -220,29 +195,30 @@
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
- height: 75px;
+ height: 30px;
margin: 2px 25px;
- padding: 12px 0 9px;
- width: 530px;
+ padding: 2px 0;
+ width: 615px;
}
#inserterbar_widget .inserterbar_carousel_item span {
display: inline-block;
font-size: 12px;
- margin: 5px 0 0 7px;
+ margin: 3px 0 0 7px;
}
#inserterbar_widget .inserterbar_carousel_item {
display: block;
- height: 30px;
- width: 110px;
+ width: 130px;
+ margin-top: 3px;
}
#inserterbar_more_widgets_container ul li {
display: inline-block;
}
-#inserterbar_more_widgets_container ul li a:first-child{
- margin-bottom: 14px;
+#inserterbar_dynamic_widget_list img {
+ max-width: 25px;
+ max-height: 20px;
}
/* Action links */
Deleted file not rendered
Deleted file not rendered
Oops, something went wrong.

0 comments on commit cbe88e0

Please sign in to comment.