Skip to content
Browse files

SAKIII-5587 No user feedback given when trying to share multiple item…

…s via Add To and one of those items cannot be shared
  • Loading branch information...
1 parent 8bd3c33 commit 066fac09b6aec2e726c443c7b8f516a439b73c27 Bert Pareyn committed May 9, 2012
View
2 dev/bundle/default.properties
@@ -1483,8 +1483,6 @@ TUESDAY = Tuesday
TYPE = Type
UNABLE_TO_DELETE_MESSAGES = Unable to delete message(s)
UNABLE_TO_SEND_YOUR_MESSAGE = Unable to send your message
-UNABLE_TO_SHARE_ERROR = Unable to share
-UNABLE_TO_SHARE_ERROR_TEXT = You don't have permission to share the content item(s):
UNDEFINED_MEMBER_PICTURE = Undefined member picture
UNDELETE = Undelete
UNDERGRADUATE_STUDENT = Undergraduate student
View
6 devwidgets/collectionviewer/javascript/collectionviewer.js
@@ -506,21 +506,15 @@ require(['jquery', 'sakai/sakai.api.core'], function($, sakai) {
var updateButtonData = function() {
var idArr = [];
var titleArr = [];
- var noShareTitleArr = [];
$('.collectionviewer_check:checked:visible', $rootel).each(function(i, item) {
idArr.push($(item).attr('data-entityid'));
titleArr.push($(item).attr('data-entityname'));
if ($(item).attr('data-canshare') !== 'true' && !$(item).attr('data-canshare-error')) {
$(item).attr('data-canshare-error', 'true');
- noShareTitleArr.push($(item).attr('data-entityname'));
}
});
$('#collections_savecontent_button', $rootel).attr('data-entityid', idArr);
$('#collections_savecontent_button', $rootel).attr('data-entityname', titleArr);
- if (noShareTitleArr.length) {
- sakai.api.Util.notification.show(sakai.api.i18n.getValueForKey('UNABLE_TO_SHARE_ERROR'),
- sakai.api.i18n.getValueForKey('UNABLE_TO_SHARE_ERROR_TEXT') + ' ' + noShareTitleArr.join(', '));
- }
};
/**
View
6 devwidgets/mylibrary/javascript/mylibrary.js
@@ -297,15 +297,13 @@ require(['jquery', 'sakai/sakai.api.core'], function($, sakai) {
var shareIdArr = [];
var addToIdArr = [];
var addToTitleArr = [];
- var noShareTitleArr = [];
$.each($('.mylibrary_check:checked:visible', $rootel), function(i, checked) {
addToIdArr.push($(checked).attr('data-entityid'));
addToTitleArr.push($(checked).attr('data-entityname'));
if ($(checked).attr('data-canshare') === 'true') {
shareIdArr.push($(checked).attr('data-entityid'));
} else if (!$(checked).attr('data-canshare-error')) {
$(checked).attr('data-canshare-error', 'true');
- noShareTitleArr.push($(checked).attr('data-entityname'));
}
});
$mylibrary_share.attr('data-entityid', shareIdArr);
@@ -314,10 +312,6 @@ require(['jquery', 'sakai/sakai.api.core'], function($, sakai) {
if (!shareIdArr.length) {
$mylibrary_share.attr('disabled', 'disabled');
}
- if (noShareTitleArr.length) {
- sakai.api.Util.notification.show(sakai.api.i18n.getValueForKey('UNABLE_TO_SHARE_ERROR'),
- sakai.api.i18n.getValueForKey('UNABLE_TO_SHARE_ERROR_TEXT') + ' ' + noShareTitleArr.join(', '));
- }
};
////////////////////
View
3 devwidgets/savecontent/bundles/default.properties
@@ -4,6 +4,7 @@ GOT_IT = got it
GROUPS_LIBRARY = ${g["sakai:group-title"]|safeOutput}'s library
MORE = more
SAVE_TO = Save to
-SOME_ITEMS_CANT_BE_SHARED = Some items can't be shared
+SOME_ITEMS_CANT_BE_SHARED = Some items can't be shared.
TO = to
+UNCHECK_FOR_MORE_OPTIONS = Uncheck these items for more sharing options.
YOU_ARE_SAVING = You are saving
View
36 devwidgets/savecontent/css/savecontent.css
@@ -15,15 +15,35 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
-#savecontent_widget {color: #333333;position:absolute;display:none;width:250px;}
-#savecontent_title {font-size: 13px; margin: 10px 10px 5px;}
-#savecontent_select {
+#savecontent_widget {
+ color: #333;
+ display: none;
+ position: absolute;
+ width: 250px;
+}
+#savecontent_widget #savecontent_title {
+ font-size: 13px;
+ margin: 10px 10px 5px;
+}
+#savecontent_widget #savecontent_select {
+ border: 1px solid #999;
height: 20px;
margin: 10px 0;
- border: 1px solid #999;
width: 220px;
}
-#savecontent_widget button {margin:10px 10px 10px 0px;}
-#savecontent_widget .savecontent_close {margin-right:20px;padding-top:6px;}
-#savecontent_widget #savecontent_select option {padding:3px 0;}
-#savecontent_widget #mylibrary_option, #savecontent_widget #mylibrary_group_first {border-top:1px solid #ddd;}
+#savecontent_widget button {
+ margin: 10px 10px 10px 0px;
+}
+#savecontent_widget .savecontent_close {
+ margin-right: 20px;
+ padding-top: 6px;
+}
+#savecontent_widget #savecontent_select option {
+ padding: 3px 0;
+}
+#savecontent_widget #mylibrary_option, #savecontent_widget #mylibrary_group_first {
+ border-top: 1px solid #ddd;
+}
+#savecontent_widget #savecontent_cant_share_list {
+ margin: 5px 0 0 17px;
+}
View
9 devwidgets/savecontent/savecontent.html
@@ -80,7 +80,14 @@ <h2 id="savecontent_title">__MSG__ADD_TO__</h2>
{/if}
</select>
{if !canShare}
- <strong>__MSG__SOME_ITEMS_CANT_BE_SHARED__</strong>
+ <span class="s3d-bold">__MSG__SOME_ITEMS_CANT_BE_SHARED__ __MSG__UNCHECK_FOR_MORE_OPTIONS__</span>
+ <ul id="savecontent_cant_share_list">
+ {for file in files}
+ {if !file.body.canShare}
+ <li>${file.body["sakai:pooled-content-file-name"]}</li>
+ {/if}
+ {/for}
+ </ul>
{/if}
--></div>

0 comments on commit 066fac0

Please sign in to comment.
Something went wrong with that request. Please try again.