File tree 5 files changed +28
-6
lines changed
5 files changed +28
-6
lines changed Original file line number Diff line number Diff line change 28
28
margin-bottom : 16px ;
29
29
}
30
30
31
- .crop-popin .crop .share-crop {
31
+ .crop-popin .crop .share-button {
32
32
display : block;
33
33
font-size : 26px ;
34
34
border-top : 2px solid # ab17a4 ;
48
48
background : linear-gradient (top, # 8f1c93 0% , # 541051 100% );
49
49
}
50
50
51
- .crop-popin .crop .share-crop : hover {
51
+ .crop-popin .crop .share-button : hover {
52
52
background : # 8f1c93 ;
53
53
}
54
54
55
- .crop-popin .crop .share-crop : active {
55
+ .crop-popin .crop .share-button : active {
56
56
border-top : 2px solid # 481c46 ;
57
57
border-bottom : 2px solid # ab17a4 ;
58
58
}
Original file line number Diff line number Diff line change 3
3
var CropPopin = global . CropPopin = new Class ( {
4
4
Extends : Popin ,
5
5
6
+ initialize : function ( ) {
7
+ this . parent . apply ( this , arguments ) ;
8
+ this . bindEvents ( ) ;
9
+ } ,
10
+
11
+ bindEvents : function ( ) {
12
+ this . shareButton = this . element . getElement ( '.share-button' ) ;
13
+ this . shareButton . addEvent ( 'click' , this . share . bind ( this ) ) ;
14
+ } ,
15
+
16
+ share : function ( e ) {
17
+ e . preventDefault ( ) ;
18
+ new Request . JSON ( {
19
+ url : settings . urls . shorten
20
+ } ) ;
21
+ //this.shareButton.
22
+ } ,
23
+
6
24
show : function ( tab ) {
7
25
this . fireEvent ( 'show' ) ;
8
26
if ( tab ) {
Original file line number Diff line number Diff line change 51
51
username = global . settings . defaultUsername ;
52
52
}
53
53
var request = new Request . JSON ( {
54
- url : '/api/' + username + '.json'
54
+ url : settings . urls . userAlbums . substitute ( { username : username } )
55
55
} ) ;
56
56
}
57
57
Original file line number Diff line number Diff line change @@ -46,7 +46,11 @@ <h1>myimg.at</h1>
46
46
{% block js %}
47
47
< script >
48
48
settings = this . settings || { } ;
49
- settings . defaultUsername = "{{ username }}" ;
49
+ settings . defaultUsername = '{{ username }}' ;
50
+ settings . urls = {
51
+ shorten : '{% url wall.views.save_cropped_photo %}' ,
52
+ userAlbums : '/api/{username}.json'
53
+ } ;
50
54
</ script >
51
55
< script src ="{{ STATIC_URL }}wall/js/mootools-core-1.3.2-compat.js "> </ script >
52
56
< script src ="{{ STATIC_URL }}wall/js/mootools-more-1.3.2.1.js "> </ script >
Original file line number Diff line number Diff line change 13
13
< div class ="crop ">
14
14
< h2 > image title</ h2 >
15
15
< div class ="photo "> </ div >
16
- < a class ="share-crop " href ="# "> share photo</ a >
16
+ < a class ="share-button " href ="# "> share photo</ a >
17
17
</ div >
18
18
< div class ="share ">
19
19
</ div >
You can’t perform that action at this time.
0 commit comments