/**
* Created by wisestone on 2018-04-02.
*/
'use strict';
define(['app'],
function (app) {
app.directive('owlAttachedFileType', ["$rootScope",
function ($rootScope) {
return {
restrict : 'A',
link : function (scope, element, attrs) {
scope.file = scope[attrs["owlAttachedFileType"]];
if ($rootScope.isDefined(scope.file)) {
if (scope.file.contentType.indexOf("image") > -1) {
element.append('
');
}
else if (scope.file.contentType.indexOf("text") > -1 || scope.file.contentType.indexOf("application") > -1) {
element.append('');
}
else if (scope.file.contentType.indexOf("video") > -1) {
element.append('');
}
else {
element.append('');
}
}
}
};
}])
});