Skip to content

Commit 0af2783

Browse files
author
Narendra Sisodiya
committed
added accessorType readOnly
1 parent 49641a4 commit 0af2783

File tree

7 files changed

+34
-4
lines changed

7 files changed

+34
-4
lines changed

CHANGE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

2+
1.0.7
3+
=====
4+
* added accessorType = readOnly
5+
26
1.0.6
37
=====
48
* Bug Fixed : globalEventBus was missing. Now added.

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pitana.js",
33
"repo": "pitana/pitana.js",
4-
"version": "1.0.6",
4+
"version": "1.0.7",
55
"main": "dist/pitana.js",
66
"keywords": [
77
"scalable",

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "pitana/pitana.js",
33
"description": "pitana.js, framework for developing large scale modular JavaScript applications using Custom Elements",
44
"repo": "pitana/pitana.js",
5-
"version": "1.0.6",
5+
"version": "1.0.7",
66
"main": "dist/pitana.js",
77
"keywords": [
88
"scalable",

dist/pitana.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,19 @@
452452
}
453453
};
454454

455+
456+
pitana.accessorType.readOnly = {
457+
get: function(attrName, attrObj) {
458+
var view = pitana.nodeToViewMapping.get(this);
459+
var f = view[attrObj.get];
460+
if (typeof f === "function") {
461+
return f.apply(view, arguments);
462+
}
463+
},
464+
set: function(attrName, newVal, attrObj) {
465+
//Sorry, readOnly access
466+
}
467+
};
455468
pitana.accessorType.json = {
456469
get: function(attrName, attrObj) {
457470
if (this["_json_" + attrName + "_init_"] === undefined) {

dist/pitana.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pitana.js",
3-
"version": "1.0.0",
3+
"version": "1.0.7",
44
"description": "pitana.js, framework for developing large scale modular JavaScript applications using Custom Elements",
55
"repository": {
66
"type": "git",

src/pitana.accessorType.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,19 @@
6363
}
6464
};
6565

66+
67+
pitana.accessorType.readOnly = {
68+
get: function(attrName, attrObj) {
69+
var view = pitana.nodeToViewMapping.get(this);
70+
var f = view[attrObj.get];
71+
if (typeof f === "function") {
72+
return f.apply(view, arguments);
73+
}
74+
},
75+
set: function(attrName, newVal, attrObj) {
76+
//Sorry, readOnly access
77+
}
78+
};
6679
pitana.accessorType.json = {
6780
get: function(attrName, attrObj) {
6881
if (this["_json_" + attrName + "_init_"] === undefined) {

0 commit comments

Comments
 (0)