diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..d79e5641 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 00000000..3b312839 --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/rpg-docs/client/views/character/characterSettings/shareDialog.html b/rpg-docs/client/views/character/characterSettings/shareDialog.html new file mode 100644 index 00000000..f205eba6 --- /dev/null +++ b/rpg-docs/client/views/character/characterSettings/shareDialog.html @@ -0,0 +1,24 @@ + + + + {{#each readers}} + + {{/each}} + {{#each writers}} + + {{/each}} + + + + + + + View Only + Can Edit + + + + + Share + + diff --git a/rpg-docs/client/views/character/characterSettings/shareDialog.js b/rpg-docs/client/views/character/characterSettings/shareDialog.js new file mode 100644 index 00000000..6271b53c --- /dev/null +++ b/rpg-docs/client/views/character/characterSettings/shareDialog.js @@ -0,0 +1,29 @@ +Template.shareDialog.helpers({ + +}); + +Template.shareDialog.events({ + "tap #shareButton": function(event, instance){ + var self = this; + var userName = instance.find("#userNameOrEmailInput").value; + var permission = instance.find("#accessLevelMenu").value; + Meteor.call("getUserId", userName, function (err, result) { + if(err){ + this.userFindError = true; + } else{ + if(permission === "write"){ + Characters.update(self._id, { + $push: {writers: result}, + $pull: {readers: result} + }); + } else { + Characters.update(self._id, { + $push: {readers: result}, + $pull: {writers: result} + }); + } + GlobalUI.closeDialog(); + } + }); + } +}); diff --git a/rpg-docs/client/views/character/characterSheet.js b/rpg-docs/client/views/character/characterSheet.js index cb60c37d..03590890 100644 --- a/rpg-docs/client/views/character/characterSheet.js +++ b/rpg-docs/client/views/character/characterSheet.js @@ -33,4 +33,11 @@ Template.characterSheet.events({ template: "deleteCharacterConfirmation", }); }, + "tap #shareCharacter": function(event, instance){ + GlobalUI.showDialog({ + heading: "Share " + this.name, + data: this, + template: "shareDialog", + }); + }, }); diff --git a/rpg-docs/packages/tests-proxy/package.js b/rpg-docs/packages/tests-proxy/package.js deleted file mode 100644 index ab81b79d..00000000 --- a/rpg-docs/packages/tests-proxy/package.js +++ /dev/null @@ -1,14 +0,0 @@ -Package.describe({ - name: "velocity:test-proxy", - summary: "Dynamically created package to expose test files to mirrors", - version: "0.0.4", - debugOnly: true -}); - -Package.onUse(function (api) { - api.use("coffeescript", ["client", "server"]); - api.add_files("tests/mocha/server/lib/characterUtility.js",["server"]); - api.add_files("tests/mocha/server/model/character/character.js",["server"]); - api.add_files("tests/mocha/server/model/character/effects.js",["server"]); - api.add_files("tests/mocha/server/sampleServerTest.js",["server"]); -}); \ No newline at end of file diff --git a/rpg-docs/packages/tests-proxy/tests b/rpg-docs/packages/tests-proxy/tests deleted file mode 120000 index c2ebfe53..00000000 --- a/rpg-docs/packages/tests-proxy/tests +++ /dev/null @@ -1 +0,0 @@ -../../tests \ No newline at end of file