Skip to content

Commit

Permalink
Merge pull request #61 from WPDevelopers/rupok-dev
Browse files Browse the repository at this point in the history
update to v2.1.0
  • Loading branch information
rupok authored Feb 14, 2019
2 parents 4b30965 + a965178 commit 58b4159
Show file tree
Hide file tree
Showing 61 changed files with 11,628 additions and 1,424 deletions.
2 changes: 1 addition & 1 deletion .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.DS_Store

node_modules/
Empty file modified admin/admin.php
100644 → 100755
Empty file.
Binary file removed admin/assets/images/wpsp-icon-light.png
Binary file not shown.
Binary file modified admin/assets/images/wpsp-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions admin/assets/images/wpsp-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/assets/images/wpsp-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
97 changes: 43 additions & 54 deletions admin/assets/images/wpsp-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
112 changes: 112 additions & 0 deletions admin/css/admin.css
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -1090,3 +1090,115 @@ background-color: rgba(238,53,95, 1);
}

}

/* review notice */

.wpdeveloper-review-notice {
padding: 10px;
background-color: #fff;
border-radius: 3px;
margin: 15px;
border-left: 4px solid transparent;
display: flex;
align-items: center;
}

.wpdeveloper-review-notice:after {
content: '';
display: table;
clear: both;
}

.wpdeveloper-notice-thumbnail {
width: 90px;
float: left;
padding: 5px;
text-align: center;
border-right: 4px solid transparent;
}

.wpdeveloper-notice-thumbnail img {
width: 72px;
opacity: .85;
transition: all .3s;
}

.wpdeveloper-notice-thumbnail img:hover {
opacity: 1;
}

.wpsp-review-text {
overflow: hidden;
}

.wpsp-review-text h3 {
font-size: 24px;
margin: 0 0 5px;
font-weight: 400;
line-height: 1.3;
}

.wpsp-review-text p {
font-size: 13px;
margin: 0 0 5px;
}

.wpdeveloper-notice-link {
margin: 8px 0 0 0;
padding: 0;
}

.wpdeveloper-notice-link li {
display: inline-block;
margin-right: 15px;
}

.wpdeveloper-notice-link li a {
display: inline-block;
color: #10738B;
text-decoration: none;
padding-left: 26px;
position: relative;
}

.wpdeveloper-notice-link li a span {
position: absolute;
left: 0;
top: -2px;
}

.wpdeveloper-notice-message {
padding: 10px 0;
}
.wpdeveloper-upsale-notice .wpdeveloper-notice-message {
display: flex;
align-items: center;
padding: 10px 0;
}
.wpdeveloper-upsale-notice .wpdeveloper-notice-message + .notice-dismiss {
top: 18px;
}
.wpdeveloper-upsale-notice #plugin-install-core {
margin-left: 10px;
}
.notice.notice-has-thumbnail {
padding-left: 0px;
}

.wpdeveloper-upsale-notice {
display: flex;
}
.wpsp-upsale-notice .wpdeveloper-notice-thumbnail {
padding: 0;
width: 80px;
display: flex;
align-items: center;
justify-content: center;
}
.wpsp-upsale-notice .wpdeveloper-notice-thumbnail img {
width: 50px;
padding: 8px;
}
a.wpsp-notice-cta{
margin-left: 10px !important
}
Empty file modified admin/css/chung-timepicker.css
100644 → 100755
Empty file.
Empty file modified admin/css/fancybox.css
100644 → 100755
Empty file.
Empty file modified admin/css/fancybox_loading.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified admin/css/fancybox_overlay.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified admin/css/fancybox_sprite.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified admin/css/font-awesome.min.css
100644 → 100755
Empty file.
47 changes: 47 additions & 0 deletions admin/gutenpost/auto-schedule.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* WordPress dependencies
*/

const { CheckboxControl } = wp.components;
const { Component, createElement } = wp.element;

class AutoSchedule extends Component {
constructor(props) {
super(props);
this.handleChange = this.handleChange.bind(this);
this.state = {
isChecked : false
}
}

handleChange( value ) {
if( this.state.isChecked ) {
value = '{ "date" : "'+ this.props.post.date +'", "date_gmt" : "'+ this.props.post.date_gmt +'", "status" : "'+ this.props.post.status +'" }';
this.setState({ isChecked : false });
} else {
this.setState({ isChecked : true });
}

this.props.editPost( JSON.stringify(value) );
}

render() {

console.log( this.props.options )

if( this.props.isScheduled ) {
return('');
}

return (
<CheckboxControl
heading = { this.props.label }
label = { this.props.options.label }
checked={ this.state.isChecked }
onChange={ () => { this.handleChange( this.props.options ) } }
/>
);
}
}

export default AutoSchedule;
34 changes: 28 additions & 6 deletions admin/gutenpost/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ const { compose, ifCondition, withInstanceId } = wp.compose;
const { withSelect, withDispatch } = wp.data;
const { PluginPostStatusInfo } = wp.editPost;
const { Component, createElement } = wp.element;
const { schedule, PanelTitle } = WPSchedulePosts;
const { schedule, PanelTitle, manual_schedule, auto_schedule, auto_date } = WPSchedulePosts;
import ScheduleList from './main';
import AutoSchedule from './auto-schedule';

class AdminPanel extends Component {
constructor(props) {
Expand All @@ -21,11 +22,32 @@ class AdminPanel extends Component {
ScheduleDates.push({ label: item.label, value : '{ "date" : "'+ item.date +'", "date_gmt" : "'+ item.date_gmt +'", "status" : "'+ item.status +'" }' });
});

return (
<PluginPostStatusInfo>
<ScheduleList { ...this.props } label={ PanelTitle } options = { ScheduleDates }/>
</PluginPostStatusInfo>
);
if( manual_schedule == 'ok' ) {
if( ScheduleDates.length <= 1 || this.props.isPublished ) {
return ('');
}
return (
<PluginPostStatusInfo>
<ScheduleList { ...this.props } label={ PanelTitle } options = { ScheduleDates }/>
</PluginPostStatusInfo>
);
}

if( auto_schedule == 'ok' ){
if( auto_date == '' ) {
return ('');
}
return (
<PluginPostStatusInfo>
<AutoSchedule { ...this.props } label={ PanelTitle } options = { auto_date }/>
</PluginPostStatusInfo>
);
}

if( auto_schedule == false && manual_schedule == false ) {
return ('');
}

}
}

Expand Down
2 changes: 1 addition & 1 deletion admin/gutenpost/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ScheduleList extends Component {
}

handleChange( value ) {
this.props.editPost( value );
this.props.editPost( value );
}

render() {
Expand Down
Empty file modified admin/install.php
100644 → 100755
Empty file.
Loading

0 comments on commit 58b4159

Please sign in to comment.