Skip to content

Commit 56fbd71

Browse files
authored
Issue #SB-000 merge: Merge pull request #3501 from shikshalokam/release-5.1.0.10
Release 5.1.0.10
2 parents 9698f8d + 0cb034e commit 56fbd71

File tree

5 files changed

+34
-18
lines changed

5 files changed

+34
-18
lines changed

build_config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cordova-plugin=cordova-plugin-x-socialsharing
77
cordova-plugin=cordova-plugin-androidx-adapter
88
cordova-plugin=cordova-plugin-device
99
cordova-plugin=cordova-plugin-file
10-
cordova-plugin=https://github.com/vishwanath1004/cordova-plugin-file-transfer
10+
cordova-plugin=https://github.com/shikshalokam/cordova-plugin-file-transfer.git
1111
cordova-plugin=cordova-plugin-inappbrowser
1212
cordova-plugin=cordova-plugin-network-information
1313
cordova-plugin=cordova-plugin-statusbar
@@ -20,20 +20,20 @@ cordova-plugin=cordova-plugin-android-permissions
2020
cordova-plugin=cordova.plugins.diagnostic
2121
cordova-plugin=com.telerik.plugins.nativepagetransitions
2222
cordova-plugin=cordova-plugin-secure-storage-echo
23-
cordova-plugin=cordova-plugin-chooser
23+
cordova-plugin=https://github.com/shikshalokam/cordova-plugin-chooser.git
2424
cordova-plugin=cordova-plugin-appavailability
2525
cordova-plugin=cordova-plugin-filepicker
2626
cordova-plugin=cordova-plugin-document-viewer
2727
cordova-plugin=com-sarriaroman-photoviewer
28-
cordova-plugin=https://github.com/vishwanath1004/cordova-plugin-filepath.git
28+
cordova-plugin=https://github.com/shikshalokam/cordova-plugin-filepath.git
2929
cordova-plugin=https://github.com/greybax/cordova-plugin-proguard.git
3030
cordova-plugin=https://github.com/Sunbird-Ed/sb-cordova-plugin-utility.git#release-4.1.0
3131
cordova-plugin=https://github.com/Sunbird-Ed/sb-cordova-plugin-downloadmanager.git
3232
cordova-plugin=https://github.com/Sunbird-Ed/sb-cordova-plugin-db.git#release-4.6.0
3333
cordova-plugin=https://github.com/Sunbird-Ed/sb-cordova-plugin-customtabs.git#release-5.0.2 --variable URL_SCHEME=@string/custom_scheme_url --variable URL_HOST=mobile
3434
cordova-plugin=cordova-sqlite-storage
3535
cordova plugin=cordova-plugin-googleplus
36-
cordova-plugin=https://github.com/vishwanath1004/cordova-plugin-camera.git
36+
cordova-plugin=https://github.com/shikshalokam/cordova-plugin-camera.git
3737
3838
cordova-plugin=cordova-plugin-filechooser
3939
cordova-plugin=cordova-plugin-media

src/app/home/user-home/user-home.page.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ describe('UserHomePage', () => {
496496
'ekstep_ncert_k-12': {
497497
teacher: [
498498
{
499-
name: 'observation',
499+
name: 'observations',
500500
icon: {
501501
web: 'assets/images/mask-image/observation_category.png',
502502
app: 'assets/imgs/observation_category.png',
@@ -522,7 +522,7 @@ describe('UserHomePage', () => {
522522
'CBSE': {
523523
teacher: [
524524
{
525-
name: 'observation',
525+
name: 'observations',
526526
icon: {
527527
web: 'assets/images/mask-image/observation_category.png',
528528
app: 'assets/imgs/observation_category.png',
@@ -586,7 +586,7 @@ describe('UserHomePage', () => {
586586
'CBSE': {
587587
teacher: [
588588
{
589-
name: 'observation',
589+
name: 'observations',
590590
icon: {
591591
web: 'assets/images/mask-image/observation_category.png',
592592
app: 'assets/imgs/observation_category.png',
@@ -618,7 +618,7 @@ describe('UserHomePage', () => {
618618
describe('should handle click action of otherCategories', () => {
619619
it('should show login prompt', (done) => {
620620
userHomePage.guestUser = true;
621-
let event = { data: [{ value: {name:'observation'} }] };
621+
let event = { data: [{ value: {name:'observations'} }] };
622622
mockPopoverController.create = jest.fn(() =>
623623
Promise.resolve({
624624
present: jest.fn(() => Promise.resolve({})),
@@ -636,7 +636,7 @@ describe('UserHomePage', () => {
636636

637637
it('should navigate to observation listing page', (done) => {
638638
userHomePage.guestUser = false;
639-
let event = { data: [{ value: {name:'observation'} }] };
639+
let event = { data: [{ value: {name:'observations'} }] };
640640
mockPopoverController.create = jest.fn(() =>
641641
Promise.resolve({
642642
present: jest.fn(() => Promise.resolve({})),

src/app/manage-learn/core/constants/actions.constants.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,16 @@ export const actions = {
104104
id:'camera'
105105
},
106106
{
107-
title: "FRMELEMNTS_LBL_GALLERY",
107+
title: "FRMELEMENTS_LBL_UPLOAD_IMAGE",
108108
icon: "images",
109-
action: "openGallery",
109+
action: "openImage",
110+
color: 'primary',
111+
id:'images'
112+
},
113+
{
114+
title: "FRMELEMENTS_LBL_UPLOAD_VIDEO",
115+
icon: "videocam",
116+
action: "openVideo",
110117
color: 'primary',
111118
id:'images'
112119
},

src/app/manage-learn/core/services/attachment/attachment.service.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ export class AttachmentService {
130130
text: this.texts["FRMELEMENTS_LBL_UPLOAD_FILE"],
131131
icon: "document",
132132
handler: () => {
133-
// this.openAllFile()
134133
this.openFile();
135134
return false;
136135
},
@@ -273,8 +272,8 @@ export class AttachmentService {
273272
const file = await this.chooser.getFile('application/pdf');
274273
let sizeOftheFile: number = file.data.length
275274
if (sizeOftheFile > localStorageConstants.FILE_LIMIT) {
276-
this.actionSheetController.dismiss();
277-
this.presentToast(this.texts["FRMELEMNTS_MSG_ERROR_FILE_SIZE_LIMIT"]);
275+
this.presentToast(this.texts["FRMELEMNTS_LBL_FILE_SIZE_EXCEEDED"]);
276+
this.actionSheetOpen ? this.actionSheetController.dismiss() :'';
278277
} else {
279278
const pathToWrite = path ? path :this.directoryPath();
280279
const newFileName = this.createFileName(file.name)
@@ -292,7 +291,11 @@ export class AttachmentService {
292291
}
293292

294293
} catch (error) {
295-
this.presentToast(this.texts["FRMELEMNTS_MSG_ERROR_WHILE_STORING_FILE"]);
294+
if(error == "OutOfMemory"){
295+
this.presentToast(this.texts["FRMELEMNTS_LBL_FILE_SIZE_EXCEEDED"]);
296+
}else{
297+
this.presentToast(this.texts["FRMELEMNTS_MSG_ERROR_WHILE_STORING_FILE"]);
298+
}
296299
}
297300
}
298301

@@ -342,6 +345,12 @@ export class AttachmentService {
342345
case 'openGallery':
343346
this.takePicture(this.camera.PictureSourceType.PHOTOLIBRARY);
344347
break;
348+
case 'openImage':
349+
this.takePicture(this.camera.PictureSourceType.PHOTOLIBRARY, this.camera.MediaType.PICTURE);
350+
break;
351+
case 'openVideo':
352+
this.takePicture(this.camera.PictureSourceType.PHOTOLIBRARY, this.camera.MediaType.VIDEO);
353+
break;
345354
case 'openFiles':
346355
this.openFile();
347356
break;

src/assets/i18n/en.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,9 +1021,9 @@
10211021
"FRMELEMENTS_LBL_FILES": "Files",
10221022
"FRMELEMENTS_LBL_ADD_IMAGE": "Add images",
10231023
"FRMELEMENTS_LBL_CAMERA": "Camera",
1024-
"FRMELEMENTS_LBL_UPLOAD_FILE": "Upload file",
1025-
"FRMELEMENTS_LBL_UPLOAD_IMAGE": "Upload image",
1026-
"FRMELEMENTS_LBL_UPLOAD_VIDEO":"Upload video",
1024+
"FRMELEMENTS_LBL_UPLOAD_FILE": "File",
1025+
"FRMELEMENTS_LBL_UPLOAD_IMAGE": "Image",
1026+
"FRMELEMENTS_LBL_UPLOAD_VIDEO":"Video",
10271027
"FRMELEMENTS_LBL_DATE": "Date",
10281028
"FRMELEMENTS_LBL_CAPTURE": "Capture",
10291029
"FRMELEMNTS_LBL_ENTITIES": "Entities",

0 commit comments

Comments
 (0)