Skip to content

Commit

Permalink
Merge branch '2.1/develop' of github.com:pyrocms/pyrocms into feature…
Browse files Browse the repository at this point in the history
…/user-fields
  • Loading branch information
adamfairholm committed Mar 20, 2012
2 parents 690a44f + a64e01d commit 6590678
Show file tree
Hide file tree
Showing 16 changed files with 333 additions and 97 deletions.
34 changes: 34 additions & 0 deletions system/cms/migrations/082_Add_cloud_files.php
Expand Up @@ -52,6 +52,37 @@ public function up()
),
));

// change some constraints
$this->dbforge->modify_column('files', array(
'name' => array(
'type' => 'VARCHAR',
'constraint' => 100,
'default' => ''
),
));

$this->dbforge->modify_column('files', array(
'description' => array(
'type' => 'TEXT'
),
));

$this->dbforge->modify_column('files', array(
'mimetype' => array(
'type' => 'VARCHAR',
'constraint' => 100,
'default' => ''
),
));

$this->dbforge->modify_column('file_folders', array(
'name' => array(
'type' => 'VARCHAR',
'constraint' => 100,
'default' => ''
),
));

$files = $this->file_m->select('id, filename')->get_all();

foreach ($files as $file)
Expand All @@ -66,10 +97,13 @@ public function down()
$this->db->where('slug', 'files_enabled_providers')->delete('settings');
$this->db->where('slug', 'files_s3_access_key')->delete('settings');
$this->db->where('slug', 'files_s3_secret_key')->delete('settings');
$this->db->where('slug', 'files_s3_url')->delete('settings');
$this->db->where('slug', 'files_cf_username')->delete('settings');
$this->db->where('slug', 'files_cf_api_key')->delete('settings');

$this->dbforge->drop_column('file_folders', 'location');
$this->dbforge->drop_column('file_folders', 'remote_container');
$this->dbforge->drop_column('files', 'path');
$this->dbforge->drop_column('files', 'download_count');
}
}
1 change: 1 addition & 0 deletions system/cms/modules/files/controllers/admin.php
Expand Up @@ -35,6 +35,7 @@ public function __construct()
pyro.lang.full_size = '".lang('files:full_size')."';
pyro.lang.cancel = '".lang('buttons.cancel')."';
pyro.lang.synchronization_started = '".lang('files:synchronization_started')."';
pyro.lang.untitled_folder = '".lang('files:untitled_folder')."';
pyro.files = { permissions : ".json_encode(Files::allowed_actions())." };
</script>");
}
Expand Down
32 changes: 24 additions & 8 deletions system/cms/modules/files/css/files.css
Expand Up @@ -2,8 +2,9 @@
.item { height: 450px; overflow: hidden; }
.sidebar { width: 20%; }
section.two_third { width: 60%; }
section.two_third .no_data { margin: 20px; }
section.two_third .no_data { margin: 40px 20px 20px 20px; }

.folders-sidebar .no_data { margin-right: 20px; }
.folders-sidebar { height: 450px; border-right: 1px solid #d8d8d8; overflow-x: hidden; overflow-y: auto; }
.folders-sidebar ul { padding-left: 15px !important; }
.folders-sidebar li a { width: 80%; padding: 6px 3px 6px 3px; cursor: pointer; font-size: 14px; display: inline-block; }
Expand Down Expand Up @@ -40,9 +41,7 @@ section.two_third .no_data { margin: 20px; }
.console .success { color: #52914D }
.console .failure { color: #B72C2C; }
.console .info { color: #354F68; }
.console li div.success { width: 20px; height: 20px; margin-right: 5px; float: left; background: url(../img/glyphicons-halflings-gray.png) no-repeat -71px -95px; }
.console li div.failure { width: 20px; height: 20px; margin-right: 5px; float: left; background: url(../img/glyphicons-halflings-gray.png) no-repeat -47px -94px; }
.console li div.info { width: 20px; height: 20px; margin-right: 5px; float: left; background: url(../img/glyphicons-halflings-gray.png) no-repeat -119px -95px; }
.console li i { margin-right: 5px; float: left; }
li.right-title { padding-left: 0; }
li.right-title label { padding-left: 10px; }
li.right-title input { margin-left: 20px; width: 83%; }
Expand All @@ -64,11 +63,13 @@ li.right-title, li.right-title label { font-size: 14px; font-weight: bold; font-
border: 2px dashed #d0d0d0;
margin: 20px auto 30px;
min-height: 100px;
color: #585858;
width: 99%;
}
#files-uploader label.upload {
position: absolute;
left: 50%;
top: 50%;
top: 20%;
display: block;
width: 200px;
height: 30px;
Expand All @@ -95,18 +96,21 @@ li.right-title, li.right-title label { font-size: 14px; font-weight: bold; font-
display: inline-block;
vertical-align: top;
}
#files-uploader-queue li > div * {
vertical-align: middle;
}
#files-uploader-queue .file_upload_preview {
border: 1px solid #ccc;
}
#files-uploader-queue .file_upload_preview div {
width: 80px;
width: 50px;
height: 30px;
border: 5px solid #fff;
overflow: hidden;
background: #fff;
}
#files-uploader-queue .file_upload_preview img {
width: 80px;
width: 50px;
}
#files-uploader-queue .filename {
width: 100px;
Expand All @@ -127,10 +131,22 @@ li.right-title, li.right-title label { font-size: 14px; font-weight: bold; font-
}
#files-uploader-queue .file_upload_cancel select {
margin-right: 10px;
max-width: 90px;
}
#files-uploader-queue .file_upload_cancel input {
margin-right: 10px;
}
#files-uploader-queue .file_upload_cancel .button {
.file_upload_cancel div.start-icon {
margin-left: 5px;
width: 30px;
height: 30px;
background: url(../img/upload.png) no-repeat 0 0;
display: inline-block;
}
.file_upload_cancel div.cancel-icon {
margin-left: 5px;
width: 30px;
height: 30px;
background: url(../img/cancel.png) no-repeat 0 0;
display: inline-block;
}
6 changes: 3 additions & 3 deletions system/cms/modules/files/css/jquery.fileupload-ui.css
Expand Up @@ -108,17 +108,17 @@ form.file_upload button,

.file_upload_progress div {
width: 150px;
height: 17px;
height: 22px;
}

.file_upload_overall_progress div {
width: 350px;
height: 17px;
height: 22px;
}

.file_upload_progress div div,
.file_upload_overall_progress div div {
height: 15px;
height: 22px;
}

.file_upload .file_name {
Expand Down
8 changes: 4 additions & 4 deletions system/cms/modules/files/details.php
Expand Up @@ -75,12 +75,12 @@ public function install()
'folder_id' => array('type' => 'INT', 'constraint' => 11, 'default' => 0,),
'user_id' => array('type' => 'INT', 'constraint' => 11, 'default' => 1,),
'type' => array('type' => 'ENUM', 'constraint' => array('a', 'v', 'd', 'i', 'o'), 'null' => true, 'default' => null,),
'name' => array('type' => 'VARCHAR', 'constraint' => 255,),
'name' => array('type' => 'VARCHAR', 'constraint' => 100,),
'filename' => array('type' => 'VARCHAR', 'constraint' => 255,),
'path' => array('type' => 'VARCHAR', 'constraint' => 255, 'default' => ''),
'description' => array('type' => 'VARCHAR', 'constraint' => 255,),
'description' => array('type' => 'TEXT',),
'extension' => array('type' => 'VARCHAR', 'constraint' => 5,),
'mimetype' => array('type' => 'VARCHAR', 'constraint' => 255,),
'mimetype' => array('type' => 'VARCHAR', 'constraint' => 50,),
'width' => array('type' => 'INT', 'constraint' => 5, 'null' => true,),
'height' => array('type' => 'INT', 'constraint' => 5, 'null' => true,),
'filesize' => array('type' => 'INT', 'constraint' => 11, 'default' => 0,),
Expand All @@ -92,7 +92,7 @@ public function install()
'id' => array('type' => 'INT', 'constraint' => 11, 'auto_increment' => true, 'primary' => true,),
'parent_id' => array('type' => 'INT', 'constraint' => 11, 'null' => true, 'default' => 0,),
'slug' => array('type' => 'VARCHAR', 'constraint' => 100,),
'name' => array('type' => 'VARCHAR', 'constraint' => 50,),
'name' => array('type' => 'VARCHAR', 'constraint' => 100,),
'location' => array('type' => 'VARCHAR', 'constraint' => 20, 'default' => 'local',),
'remote_container' => array('type' => 'VARCHAR', 'constraint' => 100, 'default' => '',),
'date_added' => array('type' => 'INT', 'constraint' => 11,),
Expand Down
Binary file added system/cms/modules/files/img/cancel.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added system/cms/modules/files/img/upload.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6590678

Please sign in to comment.